From 878a41d3be13da2a654df74f2a35ea8b295c8a13 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 16 Oct 2018 17:33:51 -0400 Subject: 10.5 --- zen/time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zen/time.h') 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)) + return false; result = zen::stringTo(StringRef(itStr, itStr + digitCount)); itStr += digitCount; -- cgit