Skip to content

Commit

Permalink
Run a pass of astyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
blast007 committed Jan 31, 2019
1 parent 883b01c commit adf4aa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/bzflag/HUDRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,13 @@ void HUDRenderer::setFPS(float _fps)
void HUDRenderer::setDrawTime(float drawTimeInseconds)
{
const int maxCnt = 10000;
if (drawTimeInseconds < 0) {
if (drawTimeInseconds < 0)
{
drawTime = drawTimeInseconds;
return;
}
if (drawTime < 0.)
{
drawTimeCnt = maxCnt;
}
if (drawTimeCnt == maxCnt)
{
minDrawTime = drawTimeInseconds;
Expand All @@ -373,13 +372,9 @@ void HUDRenderer::setDrawTime(float drawTimeInseconds)
drawTimeCnt = 0;
}
else if (drawTime < minDrawTime)
{
minDrawTime = drawTime;
}
else if (drawTime > maxDrawTime)
{
maxDrawTime = drawTime;
}
drawTimeTmp += drawTimeInseconds;
drawTimeCnt++;
drawTime = drawTimeTmp / drawTimeCnt;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/SDLMedia.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ double SDLMedia::stopwatch(bool start)
if (currentTick >= stopwatchTime)
#ifdef HAVE_SDL2
return (double) (currentTick - stopwatchTime) /
SDL_GetPerformanceFrequency(); // sec
SDL_GetPerformanceFrequency(); // sec
#else
return (double) (currentTick - stopwatchTime) * 0.001; // sec
#endif
Expand Down

0 comments on commit adf4aa2

Please sign in to comment.