diff options
author | B Stack <bgstack15@gmail.com> | 2020-06-19 16:18:18 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-06-19 16:18:18 -0400 |
commit | b2801fb887fe40875b3ec90619b011b45c1d2796 (patch) | |
tree | fbbe856cbc0ba5a5d3a831f3ec514563cc69ecb1 /zen/string_tools.h | |
parent | Merge branch '10.24' into 'master' (diff) | |
download | FreeFileSync-b2801fb887fe40875b3ec90619b011b45c1d2796.tar.gz FreeFileSync-b2801fb887fe40875b3ec90619b011b45c1d2796.tar.bz2 FreeFileSync-b2801fb887fe40875b3ec90619b011b45c1d2796.zip |
add upstream 10.25
Diffstat (limited to 'zen/string_tools.h')
-rw-r--r-- | zen/string_tools.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/string_tools.h b/zen/string_tools.h index cd26f5fd..eaf1a700 100644 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -256,8 +256,8 @@ int compareString(const S& lhs, const T& rhs) const size_t rhsLen = strLength(rhs); //length check *after* strcmpWithNulls(): we do care about natural ordering: e.g. for "compareString(makeUpperCopy(lhs), makeUpperCopy(rhs))" - const int rv = impl::strcmpWithNulls(strBegin(lhs), strBegin(rhs), std::min(lhsLen, rhsLen)); - if (rv != 0) + if (const int rv = impl::strcmpWithNulls(strBegin(lhs), strBegin(rhs), std::min(lhsLen, rhsLen)); + rv != 0) return rv; return static_cast<int>(lhsLen) - static_cast<int>(rhsLen); } @@ -269,8 +269,8 @@ int compareAsciiNoCase(const S& lhs, const T& rhs) const size_t lhsLen = strLength(lhs); const size_t rhsLen = strLength(rhs); - const int rv = impl::strcmpAsciiNoCase(strBegin(lhs), strBegin(rhs), std::min(lhsLen, rhsLen)); - if (rv != 0) + if (const int rv = impl::strcmpAsciiNoCase(strBegin(lhs), strBegin(rhs), std::min(lhsLen, rhsLen)); + rv != 0) return rv; return static_cast<int>(lhsLen) - static_cast<int>(rhsLen); } |