[vlc-devel] [PATCH 2/3] skins2: window_manager: use std::unique_ptr
Romain Vimont
rom1v at videolabs.io
Tue Apr 6 08:56:48 UTC 2021
On Tue, Apr 06, 2021 at 10:52:22AM +0200, Alexandre Janniaux wrote:
> Hi,
>
> On Tue, Apr 06, 2021 at 10:24:12AM +0200, Romain Vimont wrote:
> > On Sun, Apr 04, 2021 at 04:38:12PM +0200, Alexandre Janniaux wrote:
> > > ---
> > > modules/gui/skins2/src/window_manager.cpp | 11 +++--------
> > > modules/gui/skins2/src/window_manager.hpp | 3 ++-
> > > 2 files changed, 5 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/modules/gui/skins2/src/window_manager.cpp b/modules/gui/skins2/src/window_manager.cpp
> > > index 90f901bcf0..5f6a4655f5 100644
> > > --- a/modules/gui/skins2/src/window_manager.cpp
> > > +++ b/modules/gui/skins2/src/window_manager.cpp
> > > @@ -33,7 +33,7 @@
> > > WindowManager::WindowManager( intf_thread_t *pIntf ):
> > > SkinObject( pIntf ), m_magnet( 0 ), m_alpha( 255 ), m_moveAlpha( 255 ),
> > > m_opacityEnabled( false ), m_opacity( 255 ), m_direction( kNone ),
> > > - m_maximizeRect(0, 0, 50, 50), m_pTooltip( NULL ), m_pPopup( NULL )
> > > + m_maximizeRect(0, 0, 50, 50), m_pPopup( NULL )
> > > {
> > > // Create and register a variable for the "on top" status
> > > VarManager *pVarManager = VarManager::instance( getIntf() );
> > > @@ -47,12 +47,7 @@ WindowManager::WindowManager( intf_thread_t *pIntf ):
> > > m_opacity = 255 * var_InheritFloat( getIntf(), "qt-opacity" );
> > > }
> > >
> > > -
> > > -WindowManager::~WindowManager()
> > > -{
> > > - delete m_pTooltip;
> > > -}
> > > -
> > > +WindowManager::~WindowManager(){}
> >
> > nit:
> >
> > WindowManager::~WindowManager() = default
> >
> > ?
>
>
> That´s not possible because then Tooltip must be sized.
I suggested to replace "{}" by "= default" here, but not to move it to
the header.
More information about the vlc-devel
mailing list