Don't provide wxSharedClientDataContainer::m_data accessors

This is not really necessary and breaks encapsulation of this private
method. It is enough to provide just a way to copy the data from another
object as this is all that the derived classes really need.
This commit is contained in:
Vadim Zeitlin
2022-04-28 00:36:40 +02:00
parent de8877d3ee
commit e2a5c1ffc8
3 changed files with 9 additions and 7 deletions

View File

@@ -255,7 +255,7 @@ int wxGridColumnOperations::GetFirstLine(const wxGrid *grid, wxGridWindow *gridW
wxGridCellWorker::wxGridCellWorker(const wxGridCellWorker& other)
{
SetClientDataContainer(other.GetClientDataContainer());
CopyClientDataContainer(other);
}
void wxGridCellWorker::SetParameters(const wxString& WXUNUSED(params))
@@ -450,7 +450,7 @@ wxGridCellAttr *wxGridCellAttr::Clone() const
m_editor->IncRef();
}
attr->SetClientDataContainer(GetClientDataContainer());
attr->CopyClientDataContainer(*this);
if ( IsReadOnly() )
attr->SetReadOnly();
@@ -494,7 +494,7 @@ void wxGridCellAttr::MergeWith(wxGridCellAttr *mergefrom)
}
if ( !HasClientDataContainer() && mergefrom->HasClientDataContainer() )
{
SetClientDataContainer(mergefrom->GetClientDataContainer());
CopyClientDataContainer(*mergefrom);
}
if ( !HasReadWriteMode() && mergefrom->HasReadWriteMode() )
SetReadOnly(mergefrom->IsReadOnly());