mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Use std::swap
This commit is contained in:
parent
b0d0cb7911
commit
c6d945120e
@ -19,6 +19,8 @@
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <SDL2/SDL_render.h>
|
#include <SDL2/SDL_render.h>
|
||||||
|
|
||||||
#include <SDL2pp/Texture.hh>
|
#include <SDL2pp/Texture.hh>
|
||||||
@ -62,9 +64,7 @@ void Texture::SetColorMod(Uint8 r, Uint8 g, Uint8 b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Texture::Swap(Texture& other) noexcept {
|
void Texture::Swap(Texture& other) noexcept {
|
||||||
SDL_Texture* tmp = other.texture_;
|
std::swap(texture_, other.texture_);
|
||||||
other.texture_ = texture_;
|
|
||||||
texture_ = tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user