Fix recursion in calling const getters

We have to explicitly call non-const getter to avoid recursive calls of the const getter.
This commit is contained in:
Artur Wieczorek
2019-06-29 10:33:32 +02:00
parent d55cf1fc1f
commit ec56795572
2 changed files with 2 additions and 2 deletions

View File

@@ -305,7 +305,7 @@ public:
const wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) const const wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) const
{ {
return GetFirst(flags); return const_cast<wxPropertyGridInterface*>(this)->GetFirst(flags);
} }
// Returns pointer to a property with given name (case-sensitive). // Returns pointer to a property with given name (case-sensitive).

View File

@@ -412,7 +412,7 @@ public:
const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const
{ {
return GetLastItem(flags); return const_cast<wxPropertyGridPageState*>(this)->GetLastItem(flags);
} }
// Returns currently selected property. // Returns currently selected property.