From b2801fb887fe40875b3ec90619b011b45c1d2796 Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 19 Jun 2020 16:18:18 -0400 Subject: add upstream 10.25 --- zen/zstring.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'zen/zstring.cpp') diff --git a/zen/zstring.cpp b/zen/zstring.cpp index 8b16e02d..690f004b 100644 --- a/zen/zstring.cpp +++ b/zen/zstring.cpp @@ -64,7 +64,7 @@ Zstring getUnicodeNormalForm(const Zstring& str) return outStr; } - catch (SysError&) + catch ([[maybe_unused]] const SysError& e) { assert(false); return str; @@ -177,8 +177,7 @@ int compareNatural(const Zstring& lhs, const Zstring& rhs) const char* const strEndL = strL + lhsNorm.size(); const char* const strEndR = strR + rhsNorm.size(); - /* - - compare strings after conceptually creating blocks of whitespace/numbers/text + /* - compare strings after conceptually creating blocks of whitespace/numbers/text - implement strict weak ordering! - don't follow broken "strnatcasecmp": https://github.com/php/php-src/blob/master/ext/standard/strnatcmp.c 1. incorrect non-ASCII CI-comparison @@ -186,8 +185,7 @@ int compareNatural(const Zstring& lhs, const Zstring& rhs) 3. incorrect trimming of *all* whitespace 4. arbitrary handling of leading 0 only at string begin 5. incorrect handling of whitespace following a number - 6. code is a mess - */ + 6. code is a mess */ for (;;) { if (strL == strEndL || strR == strEndR) -- cgit