From 423028dac9bc0f6b7b0fa5d19f32ffeb8a740ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 6 May 2017 22:53:51 +0200 Subject: [PATCH] Fix some warnings with clang and GCC --- src/openrct2/Context.cpp | 3 +-- src/openrct2/platform/Platform2.cpp | 2 -- src/openrct2/windows/text_input.c | 4 +--- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index b6bf62263c..c7f22b6c84 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -77,7 +77,6 @@ namespace OpenRCT2 IScenarioRepository * _scenarioRepository = nullptr; bool _isWindowMinimised = false; - uint32 _isWindowMinimisedLastCheckTick = 0; uint32 _lastTick = 0; uint32 _uncapTick = 0; @@ -138,7 +137,7 @@ namespace OpenRCT2 /** * Causes the OpenRCT2 game loop to finish. */ - void Finish() + void Finish() override { _finished = true; } diff --git a/src/openrct2/platform/Platform2.cpp b/src/openrct2/platform/Platform2.cpp index 0be0800034..da7ae58f59 100644 --- a/src/openrct2/platform/Platform2.cpp +++ b/src/openrct2/platform/Platform2.cpp @@ -14,8 +14,6 @@ *****************************************************************************/ #pragma endregion -#pragma once - #include "Platform2.h" extern "C" diff --git a/src/openrct2/windows/text_input.c b/src/openrct2/windows/text_input.c index f71621c9a3..d5a8804195 100644 --- a/src/openrct2/windows/text_input.c +++ b/src/openrct2/windows/text_input.c @@ -280,7 +280,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) size_t char_count = 0; uint8 cur_drawn = 0; - sint32 cursorX = 0, cursorY = 0; + sint32 cursorX = 0; for (sint32 line = 0; line <= no_lines; line++) { gfx_draw_string(dpi, wrap_pointer, w->colours[1], w->x + 12, y); @@ -291,7 +291,6 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) char temp_string[TEXT_INPUT_SIZE] = { 0 }; memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count); cursorX = w->x + 13 + gfx_get_string_width(temp_string); - cursorY = y; sint32 width = 6; if (gTextInput->SelectionStart < strlen(text_input)){ @@ -322,7 +321,6 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) if (!cur_drawn) { cursorX = gLastDrawStringX; - cursorY = y - 10; } // IME composition