refactor: String, use std::ranges::lexicogriphical_compare to simplify CaselessCpm::less

This commit is contained in:
sithlord48
2025-07-11 12:45:38 -04:00
committed by Nick Bolton
parent d9ec93e7ee
commit c6a97c24a2

View File

@ -164,7 +164,7 @@ bool CaselessCmp::operator()(const std::string &a, const std::string &b) const
bool CaselessCmp::less(const std::string_view &a, const std::string_view &b)
{
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end(), &deskflow::string::CaselessCmp::cmpLess);
return std::ranges::lexicographical_compare(a, b, &deskflow::string::CaselessCmp::cmpLess);
}
bool CaselessCmp::equal(const std::string &a, const std::string &b)