From 929576710b55ed5ba83603df7f67b95e32e6d557 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 24 Nov 2016 23:37:41 +0800 Subject: [PATCH] Remove typedef bool -> Boolean, using standard bool instead --- Source/Input.cpp | 2 +- Source/Input.h | 2 +- Source/MacCompatibility.h | 3 --- Source/OpenGL_Windows.cpp | 6 +++--- Source/WinDefs.h | 2 -- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Source/Input.cpp b/Source/Input.cpp index 6080516..ae4f68f 100644 --- a/Source/Input.cpp +++ b/Source/Input.cpp @@ -88,7 +88,7 @@ unsigned short Input::CharToKey(const char* which) return SDL_NUM_SCANCODES; } -Boolean Input::MouseClicked() +bool Input::MouseClicked() { return isKeyPressed(SDL_NUM_SCANCODES + SDL_BUTTON_LEFT); } diff --git a/Source/Input.h b/Source/Input.h index e1fb6f0..302b4f4 100644 --- a/Source/Input.h +++ b/Source/Input.h @@ -39,7 +39,7 @@ public: static bool isKeyPressed(int k); static const char* keyToChar(unsigned short which); static unsigned short CharToKey(const char* which); - static Boolean MouseClicked(); + static bool MouseClicked(); }; #endif diff --git a/Source/MacCompatibility.h b/Source/MacCompatibility.h index 7786a95..07c2bc7 100644 --- a/Source/MacCompatibility.h +++ b/Source/MacCompatibility.h @@ -48,9 +48,6 @@ along with Lugaru. If not, see . # endif #endif -typedef bool Boolean; - - struct Point { short v; short h; diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 475cd99..18f7d25 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -70,7 +70,7 @@ using namespace std; set> resolutions; -Boolean SetUp (); +bool SetUp (); void DoUpdate (); void CleanUp (void); @@ -135,7 +135,7 @@ static void GLAPIENTRY glDeleteTextures_doNothing(GLsizei n, const GLuint *textu int kContextWidth; int kContextHeight; -Boolean gDone = false; +bool gDone = false; static int _argc = 0; static char **_argv = NULL; @@ -256,7 +256,7 @@ static SDL_bool sdlEventProc(const SDL_Event &e) static Point gMidPoint; -Boolean SetUp () +bool SetUp () { LOGFUNC; diff --git a/Source/WinDefs.h b/Source/WinDefs.h index 3ac74d5..94b9da0 100644 --- a/Source/WinDefs.h +++ b/Source/WinDefs.h @@ -38,8 +38,6 @@ along with Lugaru. If not, see . // disable warning about unreferenced local variables #pragma warning(disable:4101) -typedef bool Boolean; - struct Point { short v; short h; -- 2.39.5