Add wxGridBlocks::iterator::operator->()

An iterator should have this operator defined too, and not just
operator*() as it used to.
This commit is contained in:
Kvaz1r
2020-04-26 19:16:45 +03:00
committed by Vadim Zeitlin
parent e6ab2391c4
commit 63e1697dda
2 changed files with 3 additions and 0 deletions

View File

@@ -893,10 +893,12 @@ public:
typedef ptrdiff_t difference_type; typedef ptrdiff_t difference_type;
typedef wxGridBlockCoords value_type; typedef wxGridBlockCoords value_type;
typedef const value_type& reference; typedef const value_type& reference;
typedef const value_type* pointer;
iterator() : m_it() { } iterator() : m_it() { }
reference operator*() const { return *m_it; } reference operator*() const { return *m_it; }
pointer operator->() const { return &*m_it; }
iterator& operator++() iterator& operator++()
{ ++m_it; return *this; } { ++m_it; return *this; }

View File

@@ -2045,6 +2045,7 @@ public:
iterator(); iterator();
const wxGridBlockCoords& operator*() const; const wxGridBlockCoords& operator*() const;
const wxGridBlockCoords* operator->() const;
iterator& operator++(); iterator& operator++();
iterator operator++(int); iterator operator++(int);