diff options
author | B Stack <bgstack15@gmail.com> | 2020-06-20 18:42:30 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-06-20 18:42:30 +0000 |
commit | a2c5f84d26cba5401bd89978de7a1e67e0f60ea8 (patch) | |
tree | fbbe856cbc0ba5a5d3a831f3ec514563cc69ecb1 /zen/string_tools.h | |
parent | Merge branch '10.24' into 'master' (diff) | |
parent | add upstream 10.25 (diff) | |
download | FreeFileSync-a2c5f84d26cba5401bd89978de7a1e67e0f60ea8.tar.gz FreeFileSync-a2c5f84d26cba5401bd89978de7a1e67e0f60ea8.tar.bz2 FreeFileSync-a2c5f84d26cba5401bd89978de7a1e67e0f60ea8.zip |
Merge branch '10.25' into 'master'10.25
add upstream 10.25
See merge request opensource-tracking/FreeFileSync!23
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); } |