summaryrefslogtreecommitdiff
path: root/zen/time.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-10-17 02:11:26 +0000
committerB Stack <bgstack15@gmail.com>2018-10-17 02:11:26 +0000
commitf70f8f961ef8f4d909266f71310e3515f25928e6 (patch)
tree89b2a018482c164bdd8ecac5c76b19a08f420dec /zen/time.h
parentMerge branch '10.4' into 'master' (diff)
parent10.5 (diff)
downloadFreeFileSync-f70f8f961ef8f4d909266f71310e3515f25928e6.tar.gz
FreeFileSync-f70f8f961ef8f4d909266f71310e3515f25928e6.tar.bz2
FreeFileSync-f70f8f961ef8f4d909266f71310e3515f25928e6.zip
Merge branch '10.5' into 'master'10.5
10.5 See merge request opensource-tracking/FreeFileSync!2
Diffstat (limited to 'zen/time.h')
-rwxr-xr-xzen/time.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/time.h b/zen/time.h
index b06d3d15..a32e28e3 100755
--- a/zen/time.h
+++ b/zen/time.h
@@ -327,13 +327,13 @@ TimeComp parseTime(const String& format, const String2& str, UserDefinedFormatTa
const CharType* itStr = strBegin(str);
const CharType* const strLast = itStr + strLength(str);
- auto extractNumber = [&](int& result, size_t digitCount) -> bool
+ auto extractNumber = [&](int& result, size_t digitCount)
{
if (strLast - itStr < makeSigned(digitCount))
return false;
- if (std::any_of(itStr, itStr + digitCount, [](CharType c) { return !isDigit(c); }))
- return false;
+ if (!std::all_of(itStr, itStr + digitCount, isDigit<CharType>))
+ return false;
result = zen::stringTo<int>(StringRef<const CharType>(itStr, itStr + digitCount));
itStr += digitCount;
bgstack15