From 58e36db9bee4e9561416ac9bc86506ae65c8db63 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Jul 2013 01:13:10 +0300 Subject: improve size() usage in client. --- src/client.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') 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("://"); -- cgit v1.2.3-60-g2f50