summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
committerAndrei Karas <akaras@inbox.ru>2020-02-23 09:30:51 +0300
commit1e2a88e975019929c4c7e3154537865cc09550a6 (patch)
treeae8bc68ad3a3f6b61a5e2d511d7fc17daa22bd0e /src/gui/widgets/avatarlistbox.cpp
parent6941fd4eeb1dce20aba8c42fd030c2690c37b731 (diff)
downloadplus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.gz
plus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.bz2
plus-1e2a88e975019929c4c7e3154537865cc09550a6.tar.xz
plus-1e2a88e975019929c4c7e3154537865cc09550a6.zip
Fix some code style issues
Diffstat (limited to 'src/gui/widgets/avatarlistbox.cpp')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index cfacab828..cac97c092 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -174,9 +174,9 @@ void AvatarListBox::draw(Graphics *const graphics)
text = strprintf("%s %d/%d", a->getComplexName().c_str(),
a->getHp(), a->getMaxHp());
}
- const bool isPoison = a->getPoison();
if (a->getMaxHp() != 0)
{
+ const bool isPoison = a->getPoison();
const ProgressColorIdT themeColor = (isPoison
? ProgressColorId::PROG_HP_POISON
: ProgressColorId::PROG_HP);
@@ -412,9 +412,9 @@ void AvatarListBox::safeDraw(Graphics *const graphics)
text = strprintf("%s %d/%d", a->getComplexName().c_str(),
a->getHp(), a->getMaxHp());
}
- const bool isPoison = a->getPoison();
if (a->getMaxHp() != 0)
{
+ const bool isPoison = a->getPoison();
const ProgressColorIdT themeColor = (isPoison
? ProgressColorId::PROG_HP_POISON
: ProgressColorId::PROG_HP);