# HG changeset patch # User Charles Pigott # Date 2019-09-19 12:01:57 # Node ID 886780b7ff8b199bce4d8eea739976c0dd0e0622 # Parent 63292265287d1b4b49008f4756c0a7f987e6702b Fix: clang and MSVC warnings (glx) diff --git a/src/network/network_type.h b/src/network/network_type.h --- 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 --- 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 --- 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: