git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46002
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
#endif // wxUSE_UNICODE_WCHAR
}
#endif // wxUSE_UNICODE_WCHAR
-#if !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY
inline const char* wxCStrData::AsChar() const
{
inline const char* wxCStrData::AsChar() const
{
- return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+ return m_str->wx_str() + m_offset;
}
#endif // !wxUSE_UNICODE
}
#endif // !wxUSE_UNICODE
+#if wxUSE_UTF8_LOCALE_ONLY
+inline const char* wxCStrData::AsChar() const
+{
+ return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+}
+#endif // wxUSE_UTF8_LOCALE_ONLY
+
inline const wxCharBuffer wxCStrData::AsCharBuf() const
{
#if !wxUSE_UNICODE
inline const wxCharBuffer wxCStrData::AsCharBuf() const
{
#if !wxUSE_UNICODE
inline const wxStringCharType *wxCStrData::AsInternal() const
{
inline const wxStringCharType *wxCStrData::AsInternal() const
{
return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
return wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
+#else
+ return m_str->wx_str() + m_offset;
+#endif
}
inline wxUniChar wxCStrData::operator*() const
}
inline wxUniChar wxCStrData::operator*() const
{ return i + n; }
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
{ return i + n; }
{ return i + n; }
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
{ return i + n; }
- static const wxChar* AddToIter(const wxChar *i, int n)
- { return i + n; }
// returns distance of the two iterators in Unicode characters
static int DiffIters(const wxStringImpl::iterator& i1,
// returns distance of the two iterators in Unicode characters
static int DiffIters(const wxStringImpl::iterator& i1,