Code review comment for lp://staging/~gerboland/qtmir/initialSurfaceGeometry

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

635 + std::shared_ptr<MirPlacementStrategy> m_placementStrategy; // remove when bug lp:1407687 fixed
...
601 + //auto sharedPtr = the_placement_strategy(); - re-instate when bug lp:1407687 fixed
602 + if (m_placementStrategy.unique()) return 0;
603 +
604 + return static_cast<MirPlacementStrategy*>(m_placementStrategy.get());

Better as:

std::weak_ptr<MirPlacementStrategy> m_placementStrategy;
....

return m_placementStrategy.lock().get());

« Back to merge proposal