Use const_cast to change the constness
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user