Skip to content

Commit 0fdd7c8

Browse files
committed
release fixes
1 parent aefee56 commit 0fdd7c8

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/gui/gui_common_elements.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,8 @@ class category_filter_button : public right_click_button_element_base {
21522152
case country_list_filter::neighbors_no_vassals:
21532153
t_category = country_list_filter::neighbors;
21542154
break;
2155+
default:
2156+
break;
21552157
}
21562158
disabled = t_category != category;
21572159
button_element_base::render(state, x, y);

src/gui/gui_event.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ enum event_pool_slot : uint8_t {
118118
};
119119
class base_event_option_listbox : public listbox_element_base<event_option_button_row, int32_t> {
120120
public:
121-
void on_update(sys::state& state) noexcept;
121+
void on_update(sys::state& state) noexcept override;
122122
};
123123
class national_event_listbox : public base_event_option_listbox {
124124
protected:

src/gui/gui_topbar.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ class topbar_pause_button : public button_element_base {
950950

951951
float nh_temp = 15.f;
952952
std::string nh_season;
953-
if(ymd.month == 12 || (ymd.month >= 0 && ymd.month <= 2)) {
953+
if(ymd.month == 12 || ymd.month <= 2) {
954954
nh_season = text::produce_simple_string(state, "topbar_date_season_winter");
955955
} else if(ymd.month >= 3 && ymd.month <= 5) {
956956
nh_season = text::produce_simple_string(state, "topbar_date_season_spring");
@@ -966,7 +966,7 @@ class topbar_pause_button : public button_element_base {
966966
sh_season = text::produce_simple_string(state, "topbar_date_season_winter");
967967
} else if(ymd.month >= 9 && ymd.month <= 11) {
968968
sh_season = text::produce_simple_string(state, "topbar_date_season_spring");
969-
} else if(ymd.month == 12 || (ymd.month >= 0 && ymd.month <= 2)) {
969+
} else if(ymd.month == 12 || ymd.month <= 2) {
970970
sh_season = text::produce_simple_string(state, "topbar_date_season_summer");
971971
} else if(ymd.month >= 3 && ymd.month <= 5) {
972972
sh_season = text::produce_simple_string(state, "topbar_date_season_fall");

src/network/network.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,12 @@ static uint8_t const* with_network_decompressed_section(uint8_t const* ptr_in, T
343343

344344
bool client_data::is_banned(sys::state& state) const {
345345
if(state.network_state.as_v6) {
346-
auto sa = (struct sockaddr_in6*)&address;
346+
auto sa = (struct sockaddr_in6 const*)&address;
347347
return std::find_if(state.network_state.v6_banlist.begin(), state.network_state.v6_banlist.end(), [&](auto const& a) {
348348
return std::memcmp(&sa->sin6_addr, &a, sizeof(a)) == 0;
349349
}) != state.network_state.v6_banlist.end();
350350
} else {
351-
auto sa = (struct sockaddr_in*)&address;
351+
auto sa = (struct sockaddr_in const*)&address;
352352
return std::find_if(state.network_state.v4_banlist.begin(), state.network_state.v4_banlist.end(), [&](auto const& a) {
353353
return std::memcmp(&sa->sin_addr, &a, sizeof(a)) == 0;
354354
}) != state.network_state.v4_banlist.end();

0 commit comments

Comments
 (0)