From 2aa6259aa4f18e3a3f08496d943ffbbcd4398e0c Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 27 May 2022 18:53:57 +0200 Subject: [PATCH] Pass const pointer as a parameter --- include/wx/propgrid/property.h | 2 +- interface/wx/propgrid/property.h | 2 +- src/propgrid/property.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 0ace275f26..d87f4a1ab9 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -1527,7 +1527,7 @@ public: // Determines, recursively, if all children are not unspecified. // pendingList - Assumes members in this wxVariant list as pending // replacement values. - bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; + bool AreAllChildrenSpecified( const wxVariant* pendingList = NULL ) const; // Updates composed values of parent non-category properties, recursively. // Returns topmost property updated. diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index a9f201d2b8..b71a55c4da 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -1330,7 +1330,7 @@ public: Assumes members in this wxVariant list as pending replacement values. */ - bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; + bool AreAllChildrenSpecified( const wxVariant* pendingList = NULL ) const; /** Returns @true if children of this property are component values (for instance, diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index e7112ad46b..8919f8ffc8 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -2655,7 +2655,7 @@ wxVariant wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue), return wxNullVariant; } -bool wxPGProperty::AreAllChildrenSpecified( wxVariant* pendingList ) const +bool wxPGProperty::AreAllChildrenSpecified( const wxVariant* pendingList ) const { const wxVariantList* pList = NULL; wxVariantList::const_iterator node; @@ -2702,7 +2702,7 @@ bool wxPGProperty::AreAllChildrenSpecified( wxVariant* pendingList ) const if ( listValue && listValue->IsType(wxPG_VARIANT_TYPE_LIST) ) childList = listValue; - if ( !child->AreAllChildrenSpecified(const_cast(childList)) ) + if ( !child->AreAllChildrenSpecified(childList) ) return false; } }