Use empty instead of size

This commit is contained in:
Filip Gawin 2019-02-12 23:47:17 +01:00
parent 363ce67459
commit 49fe9f5db1
28 changed files with 56 additions and 56 deletions

View file

@ -227,7 +227,7 @@ std::string StripSpaces(const std::string& str)
// ends, as done by StripSpaces above, for example.
std::string StripQuotes(const std::string& s)
{
if (s.size() && '\"' == s[0] && '\"' == *s.rbegin())
if (!s.empty() && '\"' == s[0] && '\"' == *s.rbegin())
return s.substr(1, s.size() - 2);
else
return s;