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,
CtrlImage::~CtrlImage()
{
SKINS_DELETE( m_pImage );
delete m_pImage;
}
......@@ -108,7 +108,7 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest )
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
// Rescale the image with the actual size of the control
ScaledBitmap bmp( getIntf(), m_rBitmap, width, height );
SKINS_DELETE( m_pImage );
delete m_pImage;
m_pImage = pOsFactory->createOSGraphics( width, height );
m_pImage->drawBitmap( bmp, 0, 0 );
}
......
......@@ -72,7 +72,7 @@ CtrlRadialSlider::CtrlRadialSlider( intf_thread_t *pIntf,
CtrlRadialSlider::~CtrlRadialSlider()
{
m_rVariable.delObserver( this );
SKINS_DELETE( m_pImgSeq );
delete m_pImgSeq;
}
......
......@@ -99,9 +99,9 @@ CtrlSliderCursor::CtrlSliderCursor( intf_thread_t *pIntf,
CtrlSliderCursor::~CtrlSliderCursor()
{
m_rVariable.delObserver( this );
SKINS_DELETE( m_pImgUp );
SKINS_DELETE( m_pImgDown );
SKINS_DELETE( m_pImgOver );
delete m_pImgUp;
delete m_pImgDown;
delete m_pImgOver;
}
......
......@@ -59,18 +59,6 @@ class ThemeRepository;
#pragma warning ( disable:4786 )
#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()
static inline string sFromLocale( const string &rLocale )
......
......@@ -49,8 +49,8 @@ Tooltip::Tooltip( intf_thread_t *pIntf, const GenericFont &rFont, int delay ):
Tooltip::~Tooltip()
{
VarManager::instance( getIntf() )->getTooltipText().delObserver( this );
SKINS_DELETE( m_pTimer );
SKINS_DELETE( m_pOsTooltip );
delete m_pTimer;
delete m_pOsTooltip;
delete m_pImage;
}
......
......@@ -193,18 +193,8 @@ void Win32Window::setOpacity( uint8_t value ) const
void Win32Window::toggleOnTop( bool onTop ) const
{
if( onTop )
{
// 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 );
}
SetWindowPos( m_hWnd, onTop ? HWND_TOPMOST : 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