Skip to content

Commit

Permalink
Fixes warning reported by gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Nov 25, 2023
1 parent e1b2caa commit e56fd03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ui/mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ static void SendCommand(const Vec2i &tilePos)
ret = SendSpellCast(tilePos);
break;
default:
ErrorPrint("Unsupported send action %d\n", CursorAction);
ErrorPrint("Unsupported send action %d\n", static_cast<int>(CursorAction));
break;
}
if (ret) {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/script_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ static int CclSetSelectionStyle(lua_State *l)
static int CclAddMessage(lua_State *l)
{
LuaCheckArgs(l, 1);
SetMessage("%s", LuaToString(l, 1));
SetMessage("%s", LuaToString(l, 1).data());
return 0;
}

Expand Down
5 changes: 2 additions & 3 deletions src/unit/unit_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,8 @@ void SaveUnit(const CUnit &unit, CFile &file)
file.printf(",\n \"spell-cooldown\", {");
const char *sep = "";
for (int timer : unit.SpellCoolDownTimers) {
file.printf(sep);
sep = " ,";
file.printf("%d", timer);
file.printf("%s%d", sep, timer);
sep = ", ";
}
file.printf("}");
}
Expand Down

0 comments on commit e56fd03

Please sign in to comment.