diff options
author | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
commit | 840e906a4ddbbb32b8a5989e8a0ce10c8c374819 (patch) | |
tree | 6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/string_tools.h | |
parent | Merge branch '11.6' into 'master' (diff) | |
download | FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.gz FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.bz2 FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.zip |
add upstream 11.7
Diffstat (limited to 'zen/string_tools.h')
-rw-r--r-- | zen/string_tools.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/zen/string_tools.h b/zen/string_tools.h index 883c45b8..8150df05 100644 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -395,7 +395,7 @@ std::vector<S> split(const S& str, const T& delimiter, SplitOnEmpty soe) { if (str.empty() && soe == SplitOnEmpty::skip) return {}; - return { str }; + return {str}; } const auto* const delimFirst = strBegin(delimiter); @@ -800,9 +800,9 @@ template <class S, class Num> inline S numberTo(const Num& number) { using TypeTag = std::integral_constant<impl::NumberType, - IsSignedInt <Num>::value ? impl::NumberType::signedInt : - IsUnsignedInt<Num>::value ? impl::NumberType::unsignedInt : - IsFloat <Num>::value ? impl::NumberType::floatingPoint : + IsSignedIntV <Num> ? impl::NumberType::signedInt : + IsUnsignedIntV<Num> ? impl::NumberType::unsignedInt : + IsFloatV <Num> ? impl::NumberType::floatingPoint : impl::NumberType::other>; return impl::numberTo<S>(number, TypeTag()); @@ -813,9 +813,9 @@ template <class Num, class S> inline Num stringTo(const S& str) { using TypeTag = std::integral_constant<impl::NumberType, - IsSignedInt <Num>::value ? impl::NumberType::signedInt : - IsUnsignedInt<Num>::value ? impl::NumberType::unsignedInt : - IsFloat <Num>::value ? impl::NumberType::floatingPoint : + IsSignedIntV <Num> ? impl::NumberType::signedInt : + IsUnsignedIntV<Num> ? impl::NumberType::unsignedInt : + IsFloatV <Num> ? impl::NumberType::floatingPoint : impl::NumberType::other>; return impl::stringTo<Num>(str, TypeTag()); @@ -836,7 +836,7 @@ std::pair<char, char> hexify(unsigned char c, bool upperCase) else return static_cast<char>('a' + (num - 10)); }; - return { hexifyDigit(c / 16), hexifyDigit(c % 16) }; + return {hexifyDigit(c / 16), hexifyDigit(c % 16)}; } |