Skip to content

Commit

Permalink
Fix GCC compiler's warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
florianessl committed Feb 1, 2025
1 parent 9e69975 commit 6f9fedb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/game_interpreter_control_variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ int ControlVariables::InspectMapTreeInfo(InspectMapTreeInfoOp op, int map_id, in
case InspectMapTreeInfoOp::Troop_Id:
{
// TODO: provide a way to conveniently copy values into a range of variables ("ControlVarArrayEx"?)
if (arg1 >= 0 && arg1 < map_info.encounters.size()) {
if (arg1 >= 0 && arg1 < static_cast<int>(map_info.encounters.size())) {
return map_info.encounters[arg1].troop_id;
}
return 0;
Expand Down Expand Up @@ -660,6 +660,8 @@ int ControlVariables::InspectMapTreeInfo(InspectMapTreeInfoOp op, int map_id, in
return map.area_rect.r - map.area_rect.l;
case InspectMapTreeInfoOp::Arena_Height:
return map.area_rect.b - map.area_rect.t;
default:
break;
}
}
}
Expand Down Expand Up @@ -723,6 +725,8 @@ int ControlVariables::MessageWindowState(MessageWindowStateOp op) {
if (window->GetPendingMessage().ShowGoldWindow())
return 3;
return 0;
case MessageWindowStateOp::IsMessageActive:
break;
}
}

Expand Down

0 comments on commit 6f9fedb

Please sign in to comment.