Fix all compiler warnings in the game code.

This commit is contained in:
2025-08-01 23:30:21 -04:00
parent afb9554eda
commit dfba555a05
5 changed files with 6 additions and 8 deletions

View File

@@ -1599,7 +1599,6 @@ bool handle_action(const sf::Event& event, cFramerateLimiter& fps_limiter) {
} }
// Otherwise they're in a terrain view mode // Otherwise they're in a terrain view mode
location cur_loc = is_out() ? univ.party.out_loc : center;
auto button_hit = UI::toolbar.button_hit(mainPtr(), the_point, fps_limiter); auto button_hit = UI::toolbar.button_hit(mainPtr(), the_point, fps_limiter);
// MARK: Then, handle a button being hit. // MARK: Then, handle a button being hit.
@@ -2908,7 +2907,6 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
chr2 = Key::Z; chr2 = Key::Z;
} }
else { else {
location cur_loc = is_out() ? univ.party.out_loc : center;
location delta = directional_delta[i]; location delta = directional_delta[i];
if(!handle_screen_shift(delta, need_redraw)){ if(!handle_screen_shift(delta, need_redraw)){
if(handle_terrain_screen_actions(delta, false, false, did_something, need_redraw, need_reprint)){ if(handle_terrain_screen_actions(delta, false, false, did_something, need_redraw, need_reprint)){

View File

@@ -2165,7 +2165,7 @@ class cFilePicker {
return true; return true;
} }
bool dummyShowAuto(fs::path auto_folder, fs::path file) { bool dummyShowAuto(fs::path auto_folder, fs::path) {
cFilePicker dummyAuto(auto_folder, false, &me, true); cFilePicker dummyAuto(auto_folder, false, &me, true);
dummyAuto.run(); dummyAuto.run();
if(dummyAuto.dummy_picker_chose){ if(dummyAuto.dummy_picker_chose){

View File

@@ -724,7 +724,6 @@ void draw_text_bar(std::pair<std::string,std::string> text) {
static bool had_statuses = false; static bool had_statuses = false;
bool has_statuses = false; bool has_statuses = false;
for(auto next : univ.party.status) { for(auto next : univ.party.status) {
const auto& statInfo = *next.first;
if(next.second > 0) { if(next.second > 0) {
has_statuses = true; has_statuses = true;
} }
@@ -1759,4 +1758,4 @@ void debug_show_texture(const sf::Texture& texture, float seconds, std::string l
debug_window.display(); debug_window.display();
sf::sleep(sf::seconds(seconds)); sf::sleep(sf::seconds(seconds));
debug_window.setVisible(false); debug_window.setVisible(false);
} }

View File

@@ -246,11 +246,11 @@ static void handleFatalError(std::string what) {
} }
} }
void dialog_lost_focus(sf::RenderWindow& win) { static void dialog_lost_focus(sf::RenderWindow&) {
setWindowFloating(mini_map(), false); setWindowFloating(mini_map(), false);
} }
void dialog_gained_focus(sf::RenderWindow& win) { static void dialog_gained_focus(sf::RenderWindow&) {
setWindowFloating(mini_map(), true); setWindowFloating(mini_map(), true);
if(map_visible){ if(map_visible){
makeFrontWindow(mini_map()); makeFrontWindow(mini_map());

View File

@@ -2070,7 +2070,7 @@ static bool finish_pick_spell(cDialog& me, bool spell_toast, const short store_s
return true; return true;
} }
eCastStatus check_can_cast(const cPlayer& pc, eSkill type) { static eCastStatus check_can_cast(const cPlayer&, eSkill) {
return CAST_OK; return CAST_OK;
} }
@@ -2080,6 +2080,7 @@ void print_cast_status(eCastStatus status, eSkill type, std::string pc_name) {
if(!pc_name.empty()) prefix += " (" + pc_name + ")"; if(!pc_name.empty()) prefix += " (" + pc_name + ")";
prefix += ": "; prefix += ": ";
switch(status){ switch(status){
case CAST_OK: break;
case NO_CAST_ANAMA: case NO_CAST_ANAMA:
add_string_to_buf(prefix + "You're an Anama!"); add_string_to_buf(prefix + "You're an Anama!");
break; break;