summaryrefslogtreecommitdiff
path: root/src/gui/models/modelistmodel.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/models/modelistmodel.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/models/modelistmodel.cpp')
-rw-r--r--src/gui/models/modelistmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/models/modelistmodel.cpp b/src/gui/models/modelistmodel.cpp
index 60974bb7e..3c39921ad 100644
--- a/src/gui/models/modelistmodel.cpp
+++ b/src/gui/models/modelistmodel.cpp
@@ -36,12 +36,12 @@ static bool modeSorter(const std::string &mode1, const std::string &mode2)
{
const int width1 = atoi(mode1.substr(0, mode1.find('x')).c_str());
const int height1 = atoi(mode1.substr(mode1.find('x') + 1).c_str());
- if (!width1 || !height1)
+ if ((width1 == 0) || (height1 == 0))
return false;
const int width2 = atoi(mode2.substr(0, mode2.find('x')).c_str());
const int height2 = atoi(mode2.substr(mode2.find('x') + 1).c_str());
- if (!width2 || !height2)
+ if ((width2 == 0) || (height2 == 0))
return false;
if (width1 != width2)
return width1 < width2;