From 7cb9d10d72ff285ded186eddbe322898fb466e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 7 Feb 2017 21:01:07 +0100 Subject: [PATCH] Fix wrong #define checks for DEBUG macro --- src/openrct2/OpenRCT2.cpp | 2 +- src/openrct2/core/String.cpp | 2 +- src/openrct2/drawing/Image.cpp | 2 +- src/openrct2/interface/window.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index 855c07d679..534898ebfc 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -397,7 +397,7 @@ namespace OpenRCT2 { String::AppendFormat(buffer, bufferSize, " provided by %s", gBuildServer); } - #if DEBUG + #ifdef DEBUG String::AppendFormat(buffer, bufferSize, " (DEBUG)", gBuildServer); #endif _versionInfo = buffer; diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index a3c627a3ee..68c9ad85ba 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -357,7 +357,7 @@ namespace String firstNonWhitespace != str) { size_t newStringSize = ch - firstNonWhitespace; -#if DEBUG +#ifdef DEBUG size_t currentStringSize = String::SizeOf(str); Guard::Assert(newStringSize < currentStringSize, GUARD_LINE); #endif diff --git a/src/openrct2/drawing/Image.cpp b/src/openrct2/drawing/Image.cpp index 9493a12a1b..20cbf57914 100644 --- a/src/openrct2/drawing/Image.cpp +++ b/src/openrct2/drawing/Image.cpp @@ -252,7 +252,7 @@ extern "C" { if (_allocatedImageCount != 0) { -#if DEBUG +#ifdef DEBUG Guard::Assert(_allocatedImageCount == 0, "%u images were not freed", _allocatedImageCount); #else Console::Error::WriteLine("%u images were not freed", _allocatedImageCount); diff --git a/src/openrct2/interface/window.c b/src/openrct2/interface/window.c index a74d9517f1..1a366d7357 100644 --- a/src/openrct2/interface/window.c +++ b/src/openrct2/interface/window.c @@ -976,7 +976,7 @@ void widget_invalidate(rct_window *w, sint32 widgetIndex) rct_widget* widget; assert(w != NULL); -#if DEBUG +#ifdef DEBUG for (sint32 i = 0; i <= widgetIndex; i++) { assert(w->widgets[i].type != WWT_LAST); }