Skip to content

Commit

Permalink
Fix clang-tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cibomahto committed Oct 8, 2024
1 parent 109037c commit 59d5bf5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,11 @@ int MainWindow::getFrameCount()

void MainWindow::drawTimer_timeout()
{
if (getFrameCount() == 0)
const int framecount = getFrameCount();
if (framecount == 0)
return;

setFrameIndex((getCurrentFrameIndex()+1)%getFrameCount());
setFrameIndex((getCurrentFrameIndex()+1)%framecount);
}

void MainWindow::connectionScannerTimer_timeout()
Expand Down Expand Up @@ -1253,7 +1254,11 @@ void MainWindow::on_actionStepForward_triggered()
if (patternCollection.isEmpty())
return;

setFrameIndex((getCurrentFrameIndex()+1)%getFrameCount());
const int framecount = getFrameCount();
if (framecount == 0)
return;

setFrameIndex((getCurrentFrameIndex()+1)%framecount);
}

void MainWindow::on_actionStepBackward_triggered()
Expand Down

0 comments on commit 59d5bf5

Please sign in to comment.