Pass const pointer as a parameter

This commit is contained in:
Artur Wieczorek
2022-05-27 18:53:57 +02:00
parent 334a8c70ec
commit 2aa6259aa4
3 changed files with 4 additions and 4 deletions

View File

@@ -1527,7 +1527,7 @@ public:
// Determines, recursively, if all children are not unspecified. // Determines, recursively, if all children are not unspecified.
// pendingList - Assumes members in this wxVariant list as pending // pendingList - Assumes members in this wxVariant list as pending
// replacement values. // replacement values.
bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; bool AreAllChildrenSpecified( const wxVariant* pendingList = NULL ) const;
// Updates composed values of parent non-category properties, recursively. // Updates composed values of parent non-category properties, recursively.
// Returns topmost property updated. // Returns topmost property updated.

View File

@@ -1330,7 +1330,7 @@ public:
Assumes members in this wxVariant list as pending Assumes members in this wxVariant list as pending
replacement values. 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, Returns @true if children of this property are component values (for instance,

View File

@@ -2655,7 +2655,7 @@ wxVariant wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue),
return wxNullVariant; return wxNullVariant;
} }
bool wxPGProperty::AreAllChildrenSpecified( wxVariant* pendingList ) const bool wxPGProperty::AreAllChildrenSpecified( const wxVariant* pendingList ) const
{ {
const wxVariantList* pList = NULL; const wxVariantList* pList = NULL;
wxVariantList::const_iterator node; wxVariantList::const_iterator node;
@@ -2702,7 +2702,7 @@ bool wxPGProperty::AreAllChildrenSpecified( wxVariant* pendingList ) const
if ( listValue && listValue->IsType(wxPG_VARIANT_TYPE_LIST) ) if ( listValue && listValue->IsType(wxPG_VARIANT_TYPE_LIST) )
childList = listValue; childList = listValue;
if ( !child->AreAllChildrenSpecified(const_cast<wxVariant*>(childList)) ) if ( !child->AreAllChildrenSpecified(childList) )
return false; return false;
} }
} }