Commit 1bb2388c authored by JP Dinger's avatar JP Dinger

Skins2: Cosmetic.

parent 354811a1
...@@ -47,7 +47,7 @@ CtrlImage::CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -47,7 +47,7 @@ CtrlImage::CtrlImage( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
CtrlImage::~CtrlImage() CtrlImage::~CtrlImage()
{ {
SKINS_DELETE( m_pImage ); delete m_pImage;
} }
...@@ -108,7 +108,7 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest ) ...@@ -108,7 +108,7 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest )
OSFactory *pOsFactory = OSFactory::instance( getIntf() ); OSFactory *pOsFactory = OSFactory::instance( getIntf() );
// Rescale the image with the actual size of the control // Rescale the image with the actual size of the control
ScaledBitmap bmp( getIntf(), m_rBitmap, width, height ); ScaledBitmap bmp( getIntf(), m_rBitmap, width, height );
SKINS_DELETE( m_pImage ); delete m_pImage;
m_pImage = pOsFactory->createOSGraphics( width, height ); m_pImage = pOsFactory->createOSGraphics( width, height );
m_pImage->drawBitmap( bmp, 0, 0 ); m_pImage->drawBitmap( bmp, 0, 0 );
} }
......
...@@ -72,7 +72,7 @@ CtrlRadialSlider::CtrlRadialSlider( intf_thread_t *pIntf, ...@@ -72,7 +72,7 @@ CtrlRadialSlider::CtrlRadialSlider( intf_thread_t *pIntf,
CtrlRadialSlider::~CtrlRadialSlider() CtrlRadialSlider::~CtrlRadialSlider()
{ {
m_rVariable.delObserver( this ); m_rVariable.delObserver( this );
SKINS_DELETE( m_pImgSeq ); delete m_pImgSeq;
} }
......
...@@ -99,9 +99,9 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf, ...@@ -99,9 +99,9 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf,
CtrlSliderCursor::~CtrlSliderCursor() CtrlSliderCursor::~CtrlSliderCursor()
{ {
m_rVariable.delObserver( this ); m_rVariable.delObserver( this );
SKINS_DELETE( m_pImgUp ); delete m_pImgUp;
SKINS_DELETE( m_pImgDown ); delete m_pImgDown;
SKINS_DELETE( m_pImgOver ); delete m_pImgOver;
} }
......
...@@ -59,18 +59,6 @@ class ThemeRepository; ...@@ -59,18 +59,6 @@ class ThemeRepository;
#pragma warning ( disable:4786 ) #pragma warning ( disable:4786 )
#endif #endif
// Useful macros
#define SKINS_DELETE( p ) \
if( p ) \
{ \
delete p; \
} \
else \
{ \
msg_Err( getIntf(), "delete NULL pointer in %s at line %d", \
__FILE__, __LINE__ ); \
}
/// Wrapper around FromLocale, to avoid the need to call LocaleFree() /// Wrapper around FromLocale, to avoid the need to call LocaleFree()
static inline string sFromLocale( const string &rLocale ) static inline string sFromLocale( const string &rLocale )
......
...@@ -49,8 +49,8 @@ Tooltip::Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay ): ...@@ -49,8 +49,8 @@ Tooltip::Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay ):
Tooltip::~Tooltip() Tooltip::~Tooltip()
{ {
VarManager::instance( getIntf() )->getTooltipText().delObserver( this ); VarManager::instance( getIntf() )->getTooltipText().delObserver( this );
SKINS_DELETE( m_pTimer ); delete m_pTimer;
SKINS_DELETE( m_pOsTooltip ); delete m_pOsTooltip;
delete m_pImage; delete m_pImage;
} }
......
...@@ -193,18 +193,8 @@ void Win32Window::setOpacity( uint8_t value ) const ...@@ -193,18 +193,8 @@ void Win32Window::setOpacity( uint8_t value ) const
void Win32Window::toggleOnTop( bool onTop ) const void Win32Window::toggleOnTop( bool onTop ) const
{ {
if( onTop ) SetWindowPos( m_hWnd, onTop ? HWND_TOPMOST : HWND_NOTOPMOST,
{ 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );
// Set the window on top
SetWindowPos( m_hWnd, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE );
}
else
{
// Set the window not on top
SetWindowPos( m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE );
}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment