aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-11-21 02:53:49 +0000
committerMax Horn2002-11-21 02:53:49 +0000
commit013cc42e8d182db5daa3907cc93c29c1886a112b (patch)
tree355d050a6f2e1d81c34e648df07bbddf1bfec7d0
parent1f8cc789ced902dcf454591c4fafc1a27fde7c64 (diff)
downloadscummvm-rg350-013cc42e8d182db5daa3907cc93c29c1886a112b.tar.gz
scummvm-rg350-013cc42e8d182db5daa3907cc93c29c1886a112b.tar.bz2
scummvm-rg350-013cc42e8d182db5daa3907cc93c29c1886a112b.zip
operator < and > for String now ignore case
svn-id: r5649
-rw-r--r--common/str.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/str.cpp b/common/str.cpp
index db610de947..685faf85fa 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -246,16 +246,16 @@ bool ConstString::operator !=(const char* x) const
bool ConstString::operator < (const ConstString& x) const
{
- if (!_len || !x._len) // Any or both particpants are empty?
+ if (!_len || !x._len) // Any or both empty?
return !_len && x._len; // Less only if this string is empty and the other isn't
- return strcmp(_str, x._str) < 0;
+ return scumm_stricmp(_str, x._str) < 0;
}
bool ConstString::operator <= (const ConstString& x) const
{
- if (!_len || !x._len) // Any or both particpants are empty?
+ if (!_len || !x._len) // Any or both empty?
return !_len; // Less or equal unless the other string is empty and this one isn't
- return strcmp(_str, x._str) <= 0;
+ return scumm_stricmp(_str, x._str) <= 0;
}
bool ConstString::operator > (const ConstString& x) const