aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/string.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h
index fe838ac19..92f567dae 100644
--- a/zencore/include/zencore/string.h
+++ b/zencore/include/zencore/string.h
@@ -807,15 +807,8 @@ StrCaseCompare(const char* Lhs, const char* Rhs, int64_t Length = -1)
inline auto
caseSensitiveCompareStrings(const std::string& Lhs, const std::string& Rhs)
{
- if (Lhs == Rhs)
- {
- return std::strong_ordering::equal;
- }
- if (Lhs < Rhs)
- {
- return std::strong_ordering::less;
- }
- return std::strong_ordering::greater;
+ int r = Lhs.compare(Rhs);
+ return r == 0 ? std::strong_ordering::equal : r < 0 ? std::strong_ordering::less : std::strong_ordering::greater;
}
//////////////////////////////////////////////////////////////////////////