Skip to content

Commit

Permalink
range based for in fpshistory
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Sep 13, 2023
1 parent d28ff24 commit 7861d66
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/engine/render/renderwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,8 @@ void getfps(int &fps, int &bestdiff, int &worstdiff)
int total = fpshistory.at(maxfpshistory-1),
best = total,
worst = total;
for(int i = 0; i < maxfpshistory-1; ++i)
for(const int &millis : fpshistory)
{
int millis = fpshistory[i];
total += millis;
if(millis < best)
{
Expand Down

0 comments on commit 7861d66

Please sign in to comment.