From acf0c9acfcbfb745a564e084d26e0405ce1bada7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Mar 2007 23:59:09 +0000 Subject: [PATCH] added wxCStrData::operator+(long) overload (this fixes some compilation errors in wxGTK1 and probably not only there) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wx/string.h b/include/wx/string.h index d0f290dd6b..204e4be293 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -789,11 +789,13 @@ public: wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); } #endif // size_t != unsigned int - // this operator is needed to emulate the pointer semantics of c_str(): + // these operators are needed to emulate the pointer semantics of c_str(): // expressions like "wxChar *p = str.c_str() + 1;" should continue to work // (we need both versions to resolve ambiguities): wxCStrData operator+(int n) const { return wxCStrData(m_str, m_offset + n, m_owned); } + wxCStrData operator+(long n) const + { return wxCStrData(m_str, m_offset + n, m_owned); } wxCStrData operator+(size_t n) const { return wxCStrData(m_str, m_offset + n, m_owned); } -- 2.47.2