Use const_cast to change the constness

This commit is contained in:
Artur Wieczorek
2019-06-16 17:09:23 +02:00
parent 2ebdfb7a40
commit b064608c2a
9 changed files with 20 additions and 20 deletions

View File

@@ -1442,7 +1442,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
// Second pass for special entries
for ( node = list.begin(); node != list.end(); ++node )
{
wxVariant *current = (wxVariant*)*node;
wxVariant *current = const_cast<wxVariant*>(*node);
// Make sure it is wxVariant.
wxASSERT( current );
@@ -1505,7 +1505,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
{
for ( node = list.begin(); node != list.end(); ++node )
{
wxVariant *current = (wxVariant*)*node;
wxVariant *current = const_cast<wxVariant*>(*node);
const wxString& name = current->GetName();
if ( !name.empty() )
@@ -1536,7 +1536,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx
for ( node2 = list2.begin(); node2 != list2.end(); ++node2 )
{
wxVariant *attr = (wxVariant*)*node2;
wxVariant *attr = const_cast<wxVariant*>(*node2);
foundProp->SetAttribute( attr->GetName(), *attr );
}
}