summaryrefslogtreecommitdiff
path: root/src/units.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-02 03:02:59 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-02 03:02:59 +0300
commitd0df36406220717545221b0ed94b9ab4ebb908b3 (patch)
tree80e033ab6b2691dadef1e3d2e98e9fa0826dde90 /src/units.cpp
parentb96e34946aa326a9f8dfb80ce34cce9fc219405e (diff)
downloadmv-d0df36406220717545221b0ed94b9ab4ebb908b3.tar.gz
mv-d0df36406220717545221b0ed94b9ab4ebb908b3.tar.bz2
mv-d0df36406220717545221b0ed94b9ab4ebb908b3.tar.xz
mv-d0df36406220717545221b0ed94b9ab4ebb908b3.zip
Some fixes after automatic code checking.
Diffstat (limited to 'src/units.cpp')
-rw-r--r--src/units.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/units.cpp b/src/units.cpp
index d1861b78b..6971a5445 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -181,7 +181,7 @@ std::string formatUnit(int value, int type)
double amount = ud.conversion * value;
// If only the first level is needed, act like mix if false
- if (ud.mix && ud.levels.size() > 0 && ud.levels[1].count < amount)
+ if (ud.mix && !ud.levels.empty() && ud.levels[1].count < amount)
{
std::string output;
struct UnitLevel pl = ud.levels[0];