compilation fix for STL implementations that use (const) char* for std::string iterators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6972616433
commit
bfb6847df6
@ -2863,12 +2863,19 @@ inline const wchar_t* wxCStrData::AsWChar() const
|
|||||||
}
|
}
|
||||||
#endif // wxUSE_UNICODE_WCHAR
|
#endif // wxUSE_UNICODE_WCHAR
|
||||||
|
|
||||||
#if !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY
|
#if !wxUSE_UNICODE
|
||||||
|
inline const char* wxCStrData::AsChar() const
|
||||||
|
{
|
||||||
|
return m_str->wx_str() + m_offset;
|
||||||
|
}
|
||||||
|
#endif // !wxUSE_UNICODE
|
||||||
|
|
||||||
|
#if 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 wxStringOperations::AddToIter(m_str->wx_str(), m_offset);
|
||||||
}
|
}
|
||||||
#endif // !wxUSE_UNICODE
|
#endif // wxUSE_UTF8_LOCALE_ONLY
|
||||||
|
|
||||||
inline const wxCharBuffer wxCStrData::AsCharBuf() const
|
inline const wxCharBuffer wxCStrData::AsCharBuf() const
|
||||||
{
|
{
|
||||||
@ -2898,7 +2905,11 @@ inline wxString wxCStrData::AsString() const
|
|||||||
|
|
||||||
inline const wxStringCharType *wxCStrData::AsInternal() const
|
inline const wxStringCharType *wxCStrData::AsInternal() const
|
||||||
{
|
{
|
||||||
|
#if wxUSE_UNICODE_UTF8
|
||||||
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
|
||||||
|
@ -40,8 +40,6 @@ struct WXDLLIMPEXP_BASE wxStringOperationsWchar
|
|||||||
{ return i + n; }
|
{ return i + n; }
|
||||||
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
|
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, int n)
|
||||||
{ return i + 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
|
// returns distance of the two iterators in Unicode characters
|
||||||
static int DiffIters(const wxStringImpl::iterator& i1,
|
static int DiffIters(const wxStringImpl::iterator& i1,
|
||||||
|
Loading…
Reference in New Issue
Block a user