Use std::unique_ptr<> in wxListLineData and make it movable

Don't manage the pointer lifetime manually but use a smart pointer for
it: this is simpler and allows to make this class default-movable.

Also make it non-copyable as it never actually was (copying it would
have resulted in a double free of the owned pointer).
This commit is contained in:
Vadim Zeitlin 2023-01-19 02:08:04 +01:00
parent f62047f867
commit 93da9ff74e
2 changed files with 13 additions and 19 deletions

View file

@ -409,10 +409,7 @@ wxListLineData::wxListLineData( wxListMainWindow *owner )
{
m_owner = owner;
if ( InReportView() )
m_gi = nullptr;
else // !report
m_gi = new GeometryInfo;
SetReportView(InReportView());
m_highlighted = false;
m_checked = false;