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

@@ -181,8 +181,10 @@ public:
protected:
bool HasClientDataContainer() const { return m_data.get() != NULL; }
wxSharedPtr<wxClientDataContainer> GetClientDataContainer() const { return m_data; }
void SetClientDataContainer(wxSharedPtr<wxClientDataContainer> data) { m_data = data; }
void CopyClientDataContainer(const wxSharedClientDataContainer& other)
{
m_data = other.m_data;
}
private:
// Helper function that will create m_data if it is currently NULL