From 1e5c17c95a0e121a5069d514ca7cd46754ab0ca7 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sun, 11 Jan 2015 06:30:15 +0300 Subject: [PATCH] Fix argument type; we use bool in C++ --- SDL2pp/Surface.cc | 6 +++--- SDL2pp/Surface.hh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SDL2pp/Surface.cc b/SDL2pp/Surface.cc index 4a36226..b3fb6fd 100644 --- a/SDL2pp/Surface.cc +++ b/SDL2pp/Surface.cc @@ -1,6 +1,6 @@ /* libSDL2pp - C++11 bindings/wrapper for SDL2 - Copyright (C) 2014 Dmitry Marakasov + Copyright (C) 2014-2015 Dmitry Marakasov This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -173,8 +173,8 @@ void Surface::SetColorMod(Uint8 r, Uint8 g, Uint8 b) { throw Exception("SDL_SetSurfaceColorMod failed"); } -void Surface::SetRLE(int flag) { - if (SDL_SetSurfaceRLE(surface_, flag) != 0) +void Surface::SetRLE(bool flag) { + if (SDL_SetSurfaceRLE(surface_, flag ? 1 : 0) != 0) throw Exception("SDL_SetSurfaceRLE failed"); } diff --git a/SDL2pp/Surface.hh b/SDL2pp/Surface.hh index c8a74da..6f3b59b 100644 --- a/SDL2pp/Surface.hh +++ b/SDL2pp/Surface.hh @@ -469,14 +469,14 @@ public: //////////////////////////////////////////////////////////// /// \brief Set the RLE acceleration hint for a surface /// - /// \param flag 0 to disable, non-zero to enable RLE acceleration + /// \param flag False to disable, true to enable RLE acceleration /// /// \throws SDL2pp::Exception /// /// \see http://wiki.libsdl.org/SDL_SetSurfaceRLE /// //////////////////////////////////////////////////////////// - void SetRLE(int flag); + void SetRLE(bool flag); //////////////////////////////////////////////////////////// /// \brief Perform a fast fill of a rectangle with a specific color