diff options
author | Paul Gilbert | 2016-08-15 23:51:31 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-15 23:51:31 -0400 |
commit | 87d9b6682ac1093995f43444c3d8dd915e968dc2 (patch) | |
tree | 1b82fc532f10bc13824cad1550625b8d9b08cfc3 /engines/titanic/support | |
parent | a4885b1d6f783f20716c2d86316946362215bdaa (diff) | |
download | scummvm-rg350-87d9b6682ac1093995f43444c3d8dd915e968dc2.tar.gz scummvm-rg350-87d9b6682ac1093995f43444c3d8dd915e968dc2.tar.bz2 scummvm-rg350-87d9b6682ac1093995f43444c3d8dd915e968dc2.zip |
TITANIC: Implemented CBrainSlot class
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/string.cpp | 16 | ||||
-rw-r--r-- | engines/titanic/support/string.h | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index cd39c03861..1400c25733 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -122,4 +122,20 @@ CString CString::format(const char *fmt, ...) { return output; } +bool CString::operator==(const CString &x) const { + return compareToIgnoreCase(x) == 0; +} + +bool CString::operator==(const char *x) const { + return compareToIgnoreCase(x) == 0; +} + +bool CString::operator!=(const CString &x) const { + return compareToIgnoreCase(x) != 0; +} + +bool CString::operator!=(const char *x) const { + return compareToIgnoreCase(x) != 0; +} + } // End of namespace Titanic diff --git a/engines/titanic/support/string.h b/engines/titanic/support/string.h index 9550ce88a7..487c138358 100644 --- a/engines/titanic/support/string.h +++ b/engines/titanic/support/string.h @@ -49,6 +49,11 @@ public: explicit CString(char c) : Common::String(c) {} explicit CString(int val); + bool operator==(const CString &x) const; + bool operator==(const char *x) const; + bool operator!=(const CString &x) const; + bool operator!=(const char *x) const; + /** * Returns the left n characters of the string */ |