Skip to content

Commit

Permalink
release fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schombert committed May 20, 2024
1 parent aefee56 commit 0fdd7c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/gui/gui_common_elements.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2152,6 +2152,8 @@ class category_filter_button : public right_click_button_element_base {
case country_list_filter::neighbors_no_vassals:
t_category = country_list_filter::neighbors;
break;
default:
break;
}
disabled = t_category != category;
button_element_base::render(state, x, y);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/gui_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ enum event_pool_slot : uint8_t {
};
class base_event_option_listbox : public listbox_element_base<event_option_button_row, int32_t> {
public:
void on_update(sys::state& state) noexcept;
void on_update(sys::state& state) noexcept override;
};
class national_event_listbox : public base_event_option_listbox {
protected:
Expand Down
4 changes: 2 additions & 2 deletions src/gui/gui_topbar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ class topbar_pause_button : public button_element_base {

float nh_temp = 15.f;
std::string nh_season;
if(ymd.month == 12 || (ymd.month >= 0 && ymd.month <= 2)) {
if(ymd.month == 12 || ymd.month <= 2) {
nh_season = text::produce_simple_string(state, "topbar_date_season_winter");
} else if(ymd.month >= 3 && ymd.month <= 5) {
nh_season = text::produce_simple_string(state, "topbar_date_season_spring");
Expand All @@ -966,7 +966,7 @@ class topbar_pause_button : public button_element_base {
sh_season = text::produce_simple_string(state, "topbar_date_season_winter");
} else if(ymd.month >= 9 && ymd.month <= 11) {
sh_season = text::produce_simple_string(state, "topbar_date_season_spring");
} else if(ymd.month == 12 || (ymd.month >= 0 && ymd.month <= 2)) {
} else if(ymd.month == 12 || ymd.month <= 2) {
sh_season = text::produce_simple_string(state, "topbar_date_season_summer");
} else if(ymd.month >= 3 && ymd.month <= 5) {
sh_season = text::produce_simple_string(state, "topbar_date_season_fall");
Expand Down
4 changes: 2 additions & 2 deletions src/network/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ static uint8_t const* with_network_decompressed_section(uint8_t const* ptr_in, T

bool client_data::is_banned(sys::state& state) const {
if(state.network_state.as_v6) {
auto sa = (struct sockaddr_in6*)&address;
auto sa = (struct sockaddr_in6 const*)&address;
return std::find_if(state.network_state.v6_banlist.begin(), state.network_state.v6_banlist.end(), [&](auto const& a) {
return std::memcmp(&sa->sin6_addr, &a, sizeof(a)) == 0;
}) != state.network_state.v6_banlist.end();
} else {
auto sa = (struct sockaddr_in*)&address;
auto sa = (struct sockaddr_in const*)&address;
return std::find_if(state.network_state.v4_banlist.begin(), state.network_state.v4_banlist.end(), [&](auto const& a) {
return std::memcmp(&sa->sin_addr, &a, sizeof(a)) == 0;
}) != state.network_state.v4_banlist.end();
Expand Down

0 comments on commit 0fdd7c8

Please sign in to comment.