Fixed: trimSeparators function

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
Nimetu 6 years ago
parent 8f61819d43
commit 892d11d2be

@ -281,10 +281,10 @@ template <class T> T trimSeparators (const T &str)
{
typename T::size_type start = 0;
typename T::size_type size = str.size();
while (start < size && str[start] == ' ' && str[start] == '\t')
while (start < size && (str[start] == ' ' || str[start] == '\t'))
start++;
typename T::size_type end = size;
while (end > start && str[end-1] == ' ' && str[end-1] == '\t')
while (end > start && (str[end-1] == ' ' || str[end-1] == '\t'))
end--;
return str.substr (start, end-start);
}

Loading…
Cancel
Save