From c6d945120eb4910ef925fb1284590939ec6378b8 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 18 Dec 2013 16:21:55 +0400 Subject: [PATCH] Use std::swap --- SDL2pp/Texture.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SDL2pp/Texture.cc b/SDL2pp/Texture.cc index 8dde4ec..f7e2c41 100644 --- a/SDL2pp/Texture.cc +++ b/SDL2pp/Texture.cc @@ -19,6 +19,8 @@ 3. This notice may not be removed or altered from any source distribution. */ +#include + #include #include @@ -62,9 +64,7 @@ void Texture::SetColorMod(Uint8 r, Uint8 g, Uint8 b) { } void Texture::Swap(Texture& other) noexcept { - SDL_Texture* tmp = other.texture_; - other.texture_ = texture_; - texture_ = tmp; + std::swap(texture_, other.texture_); } }