diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-01 01:13:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-01 01:13:10 +0300 |
commit | 58e36db9bee4e9561416ac9bc86506ae65c8db63 (patch) | |
tree | fb226fbd8c7d18b60415de8780bafa7e3179c748 /src/client.cpp | |
parent | 0bb76176be9a6aade2611a10a61cb71065d52d38 (diff) | |
download | manaverse-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.gz manaverse-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.bz2 manaverse-58e36db9bee4e9561416ac9bc86506ae65c8db63.tar.xz manaverse-58e36db9bee4e9561416ac9bc86506ae65c8db63.zip |
improve size() usage in client.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 5 |
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("://"); |