Fix argument type; we use bool in C++

This commit is contained in:
Dmitry Marakasov 2015-01-11 06:30:15 +03:00
parent c823994fbc
commit 1e5c17c95a
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru>
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
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");
}

View File

@ -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