[FRAMEDYN]

Remove operator LPWSTR() in favor of operator LPCWSTR() const (likely to fix its export ;-))
Add missing operators implementations as inline

svn path=/trunk/; revision=59947
This commit is contained in:
Pierre Schweitzer 2013-09-01 16:10:02 +00:00
parent 50acbd2f5c
commit 765c2083ff
2 changed files with 20 additions and 2 deletions

View file

@ -1328,7 +1328,7 @@ WCHAR CHString::operator[](int nIndex) const
/*
* @implemented
*/
CHString::operator LPWSTR()
CHString::operator LPCWSTR() const
{
return m_pchData;
}

View file

@ -84,7 +84,7 @@ public:
WCHAR operator[](int nIndex) const;
operator LPWSTR();
operator LPCWSTR() const;
friend CHString WINAPI operator+(WCHAR ch, const CHString& string) throw (CHeap_Exception);
friend CHString WINAPI operator+(const CHString& string, WCHAR ch) throw (CHeap_Exception);
@ -109,4 +109,22 @@ protected:
static int WINAPI SafeStrlen(LPCWSTR lpsz);
};
inline BOOL operator==(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) == 0; }
inline BOOL operator==(const CHString& s1, const CHString& s2) { return s1.Compare(s2) == 0; }
inline BOOL operator!=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) != 0; }
inline BOOL operator!=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) != 0; }
inline BOOL operator<(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) < 0; }
inline BOOL operator<(const CHString& s1, const CHString& s2) { return s1.Compare(s2) < 0; }
inline BOOL operator>(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) > 0; }
inline BOOL operator>(const CHString& s1, const CHString& s2) { return s1.Compare(s2) > 0; }
inline BOOL operator<=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) <= 0; }
inline BOOL operator<=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) <= 0; }
inline BOOL operator>=(const CHString& s1, LPCWSTR s2) { return s1.Compare(s2) >= 0; }
inline BOOL operator>=(const CHString& s1, const CHString& s2) { return s1.Compare(s2) >= 0; }
#endif