From: Fridrich S. <str...@us...> - 2008-12-04 23:14:15
|
Update of /cvsroot/libwpd/libwpd2/src/lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7018/src/lib Modified Files: WPXString.cpp WPXString.h Log Message: making the operator== const function + adding inline operators\!= Index: WPXString.h =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- WPXString.h 9 Nov 2007 16:02:41 -0000 1.11 +++ WPXString.h 4 Dec 2008 23:14:10 -0000 1.12 @@ -46,10 +46,12 @@ void append(const char *s); void append(const char c); void clear(); - WPXString& operator=(const WPXString &); + WPXString& operator=(const WPXString &str); WPXString& operator=(const char *s); - bool operator==(const char *); - bool operator==(const WPXString &str); + bool operator==(const char *s) const; + bool operator==(const WPXString &str) const; + inline bool operator!=(const char *s) const { return !operator==(s); } + inline bool operator!=(const WPXString &str) const { return !operator==(str); } class Iter { Index: WPXString.cpp =================================================================== RCS file: /cvsroot/libwpd/libwpd2/src/lib/WPXString.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- WPXString.cpp 9 Nov 2007 16:02:41 -0000 1.19 +++ WPXString.cpp 4 Dec 2008 23:14:10 -0000 1.20 @@ -210,12 +210,12 @@ return *this; } -bool WPXString::operator==(const char *str) +bool WPXString::operator==(const char *str) const { return (m_stringImpl->m_buf == str); } -bool WPXString::operator==(const WPXString &str) +bool WPXString::operator==(const WPXString &str) const { return (m_stringImpl->m_buf == str.m_stringImpl->m_buf); } |