Update POCO to 1.11.0

This commit is contained in:
Sandu Liviu Catalin committed 2021-08-22 18:07:06 +03:00
1 parent 151077c799
commit 7a3d92d1d1
450 files changed
+25219 -6528

No files matched your search

+6 -6
View File
@@ -58,7 +58,7 @@ S trimRight(const S& str)
/// Returns a copy of str with all trailing
/// whitespace removed.
{
int pos = int(str.size()) - 1;
std::ptrdiff_t pos = static_cast<std::ptrdiff_t>(str.size()) - 1;
while (pos >= 0 && Ascii::isSpace(str[pos])) --pos;
return S(str, 0, pos + 1);
@@ -69,7 +69,7 @@ template <class S>
S& trimRightInPlace(S& str)
/// Removes all trailing whitespace in str.
{
int pos = int(str.size()) - 1;
std::ptrdiff_t pos = static_cast<std::ptrdiff_t>(str.size()) - 1;
while (pos >= 0 && Ascii::isSpace(str[pos])) --pos;
str.resize(pos + 1);
@@ -83,8 +83,8 @@ S trim(const S& str)
/// Returns a copy of str with all leading and
/// trailing whitespace removed.
{
int first = 0;
int last = int(str.size()) - 1;
std::ptrdiff_t first = 0;
std::ptrdiff_t last = static_cast<std::ptrdiff_t>(str.size()) - 1;
while (first <= last && Ascii::isSpace(str[first])) ++first;
while (last >= first && Ascii::isSpace(str[last])) --last;
@@ -97,8 +97,8 @@ template <class S>
S& trimInPlace(S& str)
/// Removes all leading and trailing whitespace in str.
{
int first = 0;
int last = int(str.size()) - 1;
std::ptrdiff_t first = 0;
std::ptrdiff_t last = static_cast<std::ptrdiff_t>(str.size()) - 1;
while (first <= last && Ascii::isSpace(str[first])) ++first;
while (last >= first && Ascii::isSpace(str[last])) --last;