https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5ea3814a2204271ee459b…
commit 5ea3814a2204271ee459b1723fdc39832683370d
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Jun 5 22:16:08 2021 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jun 5 23:28:38 2021 +0200
[ATL] Implement CString 'operator !='
---
sdk/lib/atl/cstringt.h | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/sdk/lib/atl/cstringt.h b/sdk/lib/atl/cstringt.h
index 0afe3f4763f..afd9f7971f2 100644
--- a/sdk/lib/atl/cstringt.h
+++ b/sdk/lib/atl/cstringt.h
@@ -533,6 +533,43 @@ public:
return str2.GetLength() == 1 && str2[0] == ch1;
}
+ friend bool operator!=(const CStringT& str1, const CStringT& str2) throw()
+ {
+ return str1.Compare(str2) != 0;
+ }
+
+ friend bool operator!=(const CStringT& str1, PCXSTR psz2) throw()
+ {
+ return str1.Compare(psz2) != 0;
+ }
+
+ friend bool operator!=(const CStringT& str1, PCYSTR psz2) throw()
+ {
+ CStringT tmp(psz2, str1.GetManager());
+ return tmp.Compare(str1) != 0;
+ }
+
+ friend bool operator!=(const CStringT& str1, XCHAR ch2) throw()
+ {
+ return str1.GetLength() != 1 || str1[0] != ch2;
+ }
+
+ friend bool operator!=(PCXSTR psz1, const CStringT& str2) throw()
+ {
+ return str2.Compare(psz1) != 0;
+ }
+
+ friend bool operator!=(PCYSTR psz1, const CStringT& str2) throw()
+ {
+ CStringT tmp(psz1, str2.GetManager());
+ return tmp.Compare(str2) != 0;
+ }
+
+ friend bool operator!=(XCHAR ch1, const CStringT& str2) throw()
+ {
+ return str2.GetLength() != 1 || str2[0] != ch1;
+ }
+
CStringT& operator+=(_In_ const CThisSimpleString& str)
{
CThisSimpleString::operator+=(str);