From dcfe358efacb19329272f0f41264671c6ce35cb5 Mon Sep 17 00:00:00 2001 From: Thorsten Otto Date: Thu, 21 Mar 2024 13:56:38 +0100 Subject: [PATCH] Avoid operator ++ on bool --- common/vqatask.cpp | 2 +- redalert/ending.cpp | 2 +- tiberiandawn/ending.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/vqatask.cpp b/common/vqatask.cpp index 390558fc..28f9dc50 100644 --- a/common/vqatask.cpp +++ b/common/vqatask.cpp @@ -117,7 +117,7 @@ VQAErrorType VQA_Play(VQAHandle* handle, VQAPlayMode mode) } if (data->Flags & VQA_DATA_FLAG_VIDEO_MEMORY_SET) { - ++VQAMovieDone; + VQAMovieDone = true; } else { rc = (VQAErrorType)VQA_LoadFrame(handle); diff --git a/redalert/ending.cpp b/redalert/ending.cpp index a0f778d1..08768bcb 100644 --- a/redalert/ending.cpp +++ b/redalert/ending.cpp @@ -105,7 +105,7 @@ void Nod_Ending(void) bool printedtext = false; while (!done) { if (!printedtext && !Is_Sample_Playing(kanefinl)) { - printedtext++; + printedtext = true; Alloc_Object(new ScorePrintClass(Text_String(TXT_SEL_TARGET), 0, 180, _tanpal)); mouseshown = true; Show_Mouse(); diff --git a/tiberiandawn/ending.cpp b/tiberiandawn/ending.cpp index 8c7a0367..f622399f 100644 --- a/tiberiandawn/ending.cpp +++ b/tiberiandawn/ending.cpp @@ -159,7 +159,7 @@ void Nod_Ending(void) bool printedtext = false; while (!done) { if (!printedtext && !Is_Sample_Playing(kanefinl)) { - printedtext++; + printedtext = true; Alloc_Object(new ScorePrintClass(Text_String(TXT_SEL_TARGET), 0, 180, _tanpal)); mouseshown = true; Show_Mouse(); @@ -177,7 +177,7 @@ void Nod_Ending(void) int mousex = Keyboard->MouseQX; int mousey = Keyboard->MouseQY; if (mousey >= 22 * factor && mousey <= 177 * factor) { - done++; + done = true; if (mousex < 160 * factor && mousey < 100 * factor) selection = 2; if (mousex < 160 * factor && mousey >= 100 * factor)