summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-01 01:13:10 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-01 01:13:10 +0300
commit58e36db9bee4e9561416ac9bc86506ae65c8db63 (patch)
treefb226fbd8c7d18b60415de8780bafa7e3179c748
parent0bb76176be9a6aade2611a10a61cb71065d52d38 (diff)
downloadplus-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.gz
plus-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.bz2
plus-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.xz
plus-58e36db9bee4e9561416ac9bc86506ae65c8db63.zip
improve size() usage in client.
-rw-r--r--src/client.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index cdda89585..89fa1dc4e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2158,9 +2158,10 @@ void Client::initUpdatesDir()
if (mUpdateHost.length() < 2)
return;
+ const int sz = mUpdateHost.size();
// Remove any trailing slash at the end of the update host
- if (mUpdateHost.at(mUpdateHost.size() - 1) == '/')
- mUpdateHost.resize(mUpdateHost.size() - 1);
+ if (mUpdateHost.at(sz - 1) == '/')
+ mUpdateHost.resize(sz - 1);
// Parse out any "http://" or "https://", and set the updates directory
const size_t pos = mUpdateHost.find("://");