summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-09 23:41:59 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-09 23:41:59 +0300
commita9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5 (patch)
tree20a5024ce03d3b0abedd76378c534f4150af0ee9 /src/inputmanager.cpp
parentd0ccffd7db79f5dbff6f2cb4f8b77a8bb3435e57 (diff)
downloadmv-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.gz
mv-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.bz2
mv-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.tar.xz
mv-a9d1aaa774b9e986b8ee3c6cb1e7baa1d9ba3ea5.zip
improve size() methods usage.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index 3b99c3498..b0a31b442 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -108,6 +108,7 @@ void InputManager::retrieve()
mNameMap[cf] = i;
KeyFunction &kf = mKey[i];
const std::string keyStr = config.getValue(cf, "");
+ const int keyStrSize = keyStr.size();
if (keyStr.empty())
continue;
@@ -118,7 +119,7 @@ void InputManager::retrieve()
it != it_end && i2 < KeyFunctionSize; ++ it)
{
std::string keyStr2 = *it;
- if (keyStr.size() < 2)
+ if (keyStrSize < 2)
continue;
int type = INPUT_KEYBOARD;
if ((keyStr2[0] < '0' || keyStr2[0] > '9')