Prevent assignment to wxString::const_iterator from compiling
Make const_reference const and dereference const_iterator into a const_reference to ensure that the code trying to assign to a (dereferenced) const_iterator doesn't compile. Closes https://github.com/wxWidgets/wxWidgets/pull/316
This commit is contained in:
@@ -702,7 +702,7 @@ public:
|
|||||||
typedef const wxChar* const_pointer;
|
typedef const wxChar* const_pointer;
|
||||||
|
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
typedef wxUniChar const_reference;
|
typedef const wxUniChar const_reference;
|
||||||
|
|
||||||
#if wxUSE_STD_STRING
|
#if wxUSE_STD_STRING
|
||||||
#if wxUSE_UNICODE_UTF8
|
#if wxUSE_UNICODE_UTF8
|
||||||
@@ -951,7 +951,7 @@ public:
|
|||||||
const_iterator(const const_iterator& i) : m_cur(i.m_cur) {}
|
const_iterator(const const_iterator& i) : m_cur(i.m_cur) {}
|
||||||
const_iterator(const iterator& i) : m_cur(i.m_cur) {}
|
const_iterator(const iterator& i) : m_cur(i.m_cur) {}
|
||||||
|
|
||||||
reference operator*() const
|
const_reference operator*() const
|
||||||
{ return wxStringOperations::DecodeChar(m_cur); }
|
{ return wxStringOperations::DecodeChar(m_cur); }
|
||||||
|
|
||||||
const_iterator operator+(ptrdiff_t n) const
|
const_iterator operator+(ptrdiff_t n) const
|
||||||
|
Reference in New Issue
Block a user