Skip to content
Snippets Groups Projects
Verified Commit 3802b8d8 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

C++20 modernization: use std::ranges::lexicographical_compare

parent de23d550
Branches
No related tags found
No related merge requests found
......@@ -110,9 +110,8 @@ Environment::print(ostream& output, const vector<string>& vars, int line, bool s
// For sorting the symbols in a case-insensitive way, see #128
auto case_insensitive_string_less = [](const string& a, const string& b) {
return lexicographical_compare(
begin(a), end(a), begin(b), end(b),
[](const char& c1, const char& c2) { return tolower(c1) < tolower(c2); });
return ranges::lexicographical_compare(
a, b, [](char c1, char c2) { return tolower(c1) < tolower(c2); });
};
if (vars.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment