diff options
author | B Stack <bgstack15@gmail.com> | 2018-10-16 17:33:51 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2018-10-16 17:33:51 -0400 |
commit | 878a41d3be13da2a654df74f2a35ea8b295c8a13 (patch) | |
tree | 89b2a018482c164bdd8ecac5c76b19a08f420dec /zen/time.h | |
parent | Merge branch '10.4' into 'master' (diff) | |
download | FreeFileSync-878a41d3be13da2a654df74f2a35ea8b295c8a13.tar.gz FreeFileSync-878a41d3be13da2a654df74f2a35ea8b295c8a13.tar.bz2 FreeFileSync-878a41d3be13da2a654df74f2a35ea8b295c8a13.zip |
10.5
Diffstat (limited to 'zen/time.h')
-rwxr-xr-x | zen/time.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |