Author: pschweitzer Date: Sun Sep 1 16:10:02 2013 New Revision: 59947
URL: http://svn.reactos.org/svn/reactos?rev=59947&view=rev Log: [FRAMEDYN] Remove operator LPWSTR() in favor of operator LPCWSTR() const (likely to fix its export ;-)) Add missing operators implementations as inline
Modified: trunk/reactos/dll/win32/framedyn/chstring.cpp trunk/reactos/include/psdk/chstring.h
Modified: trunk/reactos/dll/win32/framedyn/chstring.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/framedyn/chstring... ============================================================================== --- trunk/reactos/dll/win32/framedyn/chstring.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/framedyn/chstring.cpp [iso-8859-1] Sun Sep 1 16:10:02 2013 @@ -1328,7 +1328,7 @@ /* * @implemented */ -CHString::operator LPWSTR() +CHString::operator LPCWSTR() const { return m_pchData; }
Modified: trunk/reactos/include/psdk/chstring.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/chstring.h?rev... ============================================================================== --- trunk/reactos/include/psdk/chstring.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/chstring.h [iso-8859-1] Sun Sep 1 16:10:02 2013 @@ -84,7 +84,7 @@
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 @@ 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