Skip to content

Commit 928d540

Browse files
committed
refactor: Change int to unsigned int
1 parent 8cb1333 commit 928d540

File tree

2 files changed

+8
-8
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

2 files changed

+8
-8
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
276276
UnicodeString extraStr;
277277

278278
time_t totalSeconds = header.endTime - header.startTime;
279-
Int hours = totalSeconds / 3600;
280-
Int mins = (totalSeconds % 3600) / 60;
281-
Int secs = totalSeconds % 60;
279+
UnsignedInt hours = totalSeconds / 3600;
280+
UnsignedInt mins = (totalSeconds % 3600) / 60;
281+
UnsignedInt secs = totalSeconds % 60;
282282
Real fps = header.frameCount / totalSeconds;
283-
extraStr.format(L"%02d:%02d:%02d (%g fps)", hours, mins, secs, fps);
283+
extraStr.format(L"%02u:%02u:%02u (%g fps)", hours, mins, secs, fps);
284284

285285
if (header.localPlayerIndex >= 0)
286286
{

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
276276
UnicodeString extraStr;
277277

278278
time_t totalSeconds = header.endTime - header.startTime;
279-
Int hours = totalSeconds / 3600;
280-
Int mins = (totalSeconds % 3600) / 60;
281-
Int secs = totalSeconds % 60;
279+
UnsignedInt hours = totalSeconds / 3600;
280+
UnsignedInt mins = (totalSeconds % 3600) / 60;
281+
UnsignedInt secs = totalSeconds % 60;
282282
Real fps = header.frameCount / totalSeconds;
283-
extraStr.format(L"%02d:%02d:%02d (%g fps)", hours, mins, secs, fps);
283+
extraStr.format(L"%02u:%02u:%02u (%g fps)", hours, mins, secs, fps);
284284

285285
if (header.localPlayerIndex >= 0)
286286
{

0 commit comments

Comments
 (0)