From 63e1697dda2bacd16b57d64271af9e459ff3bb07 Mon Sep 17 00:00:00 2001 From: Kvaz1r Date: Sun, 26 Apr 2020 19:16:45 +0300 Subject: [PATCH] Add wxGridBlocks::iterator::operator->() An iterator should have this operator defined too, and not just operator*() as it used to. --- include/wx/generic/grid.h | 2 ++ interface/wx/grid.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 02ae6d2554..fe29a857ad 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -893,10 +893,12 @@ public: typedef ptrdiff_t difference_type; typedef wxGridBlockCoords value_type; typedef const value_type& reference; + typedef const value_type* pointer; iterator() : m_it() { } reference operator*() const { return *m_it; } + pointer operator->() const { return &*m_it; } iterator& operator++() { ++m_it; return *this; } diff --git a/interface/wx/grid.h b/interface/wx/grid.h index d478052677..0ac6074571 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -2045,6 +2045,7 @@ public: iterator(); const wxGridBlockCoords& operator*() const; + const wxGridBlockCoords* operator->() const; iterator& operator++(); iterator operator++(int);