Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
79c939eb
Commit
79c939eb
authored
Oct 13, 2018
by
Alan Barr
Committed by
Hisham Muhammad
Feb 10, 2019
Browse files
Remove duplicated if condition
The for loop already handles i being < nPanels Raised by cppcheck
parent
dc7d0352
Changes
1
Hide whitespace changes
Inline
Side-by-side
ScreenManager.c
View file @
79c939eb
...
...
@@ -145,14 +145,12 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi
}
static
void
ScreenManager_drawPanels
(
ScreenManager
*
this
,
int
focus
)
{
int
nPanels
=
this
->
panelCount
;
const
int
nPanels
=
this
->
panelCount
;
for
(
int
i
=
0
;
i
<
nPanels
;
i
++
)
{
Panel
*
panel
=
(
Panel
*
)
Vector_get
(
this
->
panels
,
i
);
Panel_draw
(
panel
,
i
==
focus
);
if
(
i
<
nPanels
)
{
if
(
this
->
orientation
==
HORIZONTAL
)
{
mvvline
(
panel
->
y
,
panel
->
x
+
panel
->
w
,
' '
,
panel
->
h
+
1
);
}
if
(
this
->
orientation
==
HORIZONTAL
)
{
mvvline
(
panel
->
y
,
panel
->
x
+
panel
->
w
,
' '
,
panel
->
h
+
1
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment