summaryrefslogtreecommitdiff
path: root/zen/string_tools.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/string_tools.h
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip
Merge branch '11.7' into 'master'11.7
add upstream 11.7 See merge request opensource-tracking/FreeFileSync!31
Diffstat (limited to 'zen/string_tools.h')
-rw-r--r--zen/string_tools.h16
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)};
}
bgstack15