summaryrefslogtreecommitdiff
path: root/src/gui/widgets/staticbrowserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-17 18:55:36 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-17 18:55:36 +0300
commit4ecdb004e81a459ea63ebd7127e1c945df43f9ce (patch)
treea8ece58a62724c4b088484e0b5c1f44fdbf2f7e1 /src/gui/widgets/staticbrowserbox.cpp
parent334c1c50dfa57da0b91687e097db295a6a3b699b (diff)
downloadplus-4ecdb004e81a459ea63ebd7127e1c945df43f9ce.tar.gz
plus-4ecdb004e81a459ea63ebd7127e1c945df43f9ce.tar.bz2
plus-4ecdb004e81a459ea63ebd7127e1c945df43f9ce.tar.xz
plus-4ecdb004e81a459ea63ebd7127e1c945df43f9ce.zip
Fix issues detected by coverity.
Diffstat (limited to 'src/gui/widgets/staticbrowserbox.cpp')
-rw-r--r--src/gui/widgets/staticbrowserbox.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp
index 7be4b780e..5999b2adf 100644
--- a/src/gui/widgets/staticbrowserbox.cpp
+++ b/src/gui/widgets/staticbrowserbox.cpp
@@ -668,16 +668,12 @@ void StaticBrowserBox::updateHeight()
break;
std::string part = row.substr(start, len);
- int width = 0;
- if (bold)
- width = boldFont->getWidth(part);
- else
- width = font->getWidth(part);
mLineParts.push_back(LinePart(CAST_S32(x),
CAST_S32(y) + mItemPadding,
selColor[0], selColor[1], part.c_str(), bold));
+ int width = 0;
if (bold)
width = boldFont->getWidth(part);
else