fdr_compile: simplify lambda use

This was failing to compile on MSVC.
This commit is contained in:
Justin Viiret 2017-08-16 13:05:24 +10:00 committed by Matthew Barr
parent b694fed727
commit 85c8822dd1

View File

@ -644,11 +644,12 @@ bool isSuffix(const hwlmLiteral &lit1, const hwlmLiteral &lit2) {
size_t len2 = s2.length(); size_t len2 = s2.length();
assert(len1 >= len2); assert(len1 >= len2);
auto lit_cmp = (lit1.nocase || lit2.nocase) if (lit1.nocase || lit2.nocase) {
? [](char a, char b) { return mytoupper(a) == mytoupper(b); } return equal(s2.begin(), s2.end(), s1.begin() + len1 - len2,
: [](char a, char b) { return a == b; }; [](char a, char b) { return mytoupper(a) == mytoupper(b); });
} else {
return equal(s2.begin(), s2.end(), s1.begin() + len1 - len2, lit_cmp); return equal(s2.begin(), s2.end(), s1.begin() + len1 - len2);
}
} }
/* /*