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:
parent
f62047f867
commit
93da9ff74e
2 changed files with 13 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue