From ec56795572f4ad7db15d015f3b110184b3a0bca1 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 29 Jun 2019 10:33:32 +0200 Subject: [PATCH] Fix recursion in calling const getters We have to explicitly call non-const getter to avoid recursive calls of the const getter. --- include/wx/propgrid/propgridiface.h | 2 +- include/wx/propgrid/propgridpagestate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/propgrid/propgridiface.h b/include/wx/propgrid/propgridiface.h index b5ced1bf31..f2ddc00787 100644 --- a/include/wx/propgrid/propgridiface.h +++ b/include/wx/propgrid/propgridiface.h @@ -305,7 +305,7 @@ public: const wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) const { - return GetFirst(flags); + return const_cast(this)->GetFirst(flags); } // Returns pointer to a property with given name (case-sensitive). diff --git a/include/wx/propgrid/propgridpagestate.h b/include/wx/propgrid/propgridpagestate.h index a30a7afe1a..cd48369640 100644 --- a/include/wx/propgrid/propgridpagestate.h +++ b/include/wx/propgrid/propgridpagestate.h @@ -412,7 +412,7 @@ public: const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const { - return GetLastItem(flags); + return const_cast(this)->GetLastItem(flags); } // Returns currently selected property.