Commit 79c939eb authored by Alan Barr's avatar Alan Barr Committed by Hisham Muhammad
Browse files

Remove duplicated if condition

The for loop already handles i being < nPanels

Raised by cppcheck
parent dc7d0352
...@@ -145,16 +145,14 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi ...@@ -145,16 +145,14 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi
} }
static void ScreenManager_drawPanels(ScreenManager* this, int focus) { static void ScreenManager_drawPanels(ScreenManager* this, int focus) {
int nPanels = this->panelCount; const int nPanels = this->panelCount;
for (int i = 0; i < nPanels; i++) { for (int i = 0; i < nPanels; i++) {
Panel* panel = (Panel*) Vector_get(this->panels, i); Panel* panel = (Panel*) Vector_get(this->panels, i);
Panel_draw(panel, i == focus); Panel_draw(panel, i == focus);
if (i < nPanels) {
if (this->orientation == HORIZONTAL) { if (this->orientation == HORIZONTAL) {
mvvline(panel->y, panel->x+panel->w, ' ', panel->h+1); mvvline(panel->y, panel->x+panel->w, ' ', panel->h+1);
} }
} }
}
} }
static Panel* setCurrentPanel(Panel* panel) { static Panel* setCurrentPanel(Panel* panel) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment