From fe9731d32c554115724275968c7c06655ae024dd Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Thu, 19 Sep 2019 13:01:57 +0100 Subject: Fix: clang and MSVC warnings (glx) --- src/network/network_type.h | 2 +- src/script/api/script_client.hpp | 2 +- src/town_gui.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/network/network_type.h b/src/network/network_type.h index 9b598716f..d511f5c0c 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -38,7 +38,7 @@ enum NetworkVehicleType { }; /** 'Unique' identifier to be given to clients */ -enum ClientID { +enum ClientID : uint32 { INVALID_CLIENT_ID = 0, ///< Client is not part of anything CLIENT_ID_SERVER = 1, ///< Servers always have this ID CLIENT_ID_FIRST = 2, ///< The first client ID diff --git a/src/script/api/script_client.hpp b/src/script/api/script_client.hpp index 423f134c0..20cbdc7fe 100644 --- a/src/script/api/script_client.hpp +++ b/src/script/api/script_client.hpp @@ -26,7 +26,7 @@ class ScriptClient : public ScriptObject { public: /** Different constants related to ClientID. */ - enum ClientID { + enum ClientID : uint32 { CLIENT_INVALID = 0, ///< Client is not part of anything CLIENT_SERVER = 1, ///< Servers always have this ID CLIENT_FIRST = 2, ///< The first client ID diff --git a/src/town_gui.cpp b/src/town_gui.cpp index e32e967f7..6cb449ab5 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -965,7 +965,7 @@ public: this->vscroll->SetCapacityFromWidget(this, WID_TD_LIST); } - virtual void OnEditboxChanged(int wid) + void OnEditboxChanged(int wid) override { if (wid == WID_TD_FILTER) { this->string_filter.SetFilterTerm(this->townname_editbox.text.buf); @@ -1010,7 +1010,7 @@ public: this->towns.Sort(); this->towns.shrink_to_fit(); this->towns.RebuildDone(); - this->vscroll->SetCount(this->towns.size()); // Update scrollbar as well. + this->vscroll->SetCount((int)this->towns.size()); // Update scrollbar as well. } break; default: -- cgit v1.2.3-70-g09d2