summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-10-30 16:29:54 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-10 07:58:34 +0100
commitaf43f453b8aa28e861fad8e24bdeebffba5f92dc (patch)
tree9c5d18a0ece3fca7b0cdf3dfd4592bf3ea7ec318 /vcl/win
parentec35815319f70def8d41fe4a865d08b90a953203 (diff)
no check before delete and move to intializer list
Change-Id: Ib6e50f863db1a64dc42ed4313a009abe4932ce3f
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/salgdi.cxx38
1 files changed, 18 insertions, 20 deletions
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index b8d465a06fd4..8ccc7d0dc39b 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -555,7 +555,23 @@ void ImplClearHDCCache( SalData* pData )
}
WinSalGraphics::WinSalGraphics():
- mpImpl(new WinSalGraphicsImpl(*this))
+ mpImpl(new WinSalGraphicsImpl(*this)),
+ mhLocalDC(0),
+ mfCurrentFontScale(1.0),
+ mhRegion(0),
+ mhDefPen(0),
+ mhDefBrush(0),
+ mhDefFont(0),
+ mhDefPal(0),
+ mpStdClipRgnData(NULL),
+ mpLogFont(NULL),
+ mpFontCharSets(NULL),
+ mpFontAttrCache(NULL),
+ mnFontCharSetCount(0),
+ mpFontKernPairs(NULL),
+ mnFontKernPairCount(0),
+ mbFontKernInit(false),
+ mnPenWidth(GSL_PEN_WIDTH)
{
for( int i = 0; i < MAX_FALLBACK; ++i )
{
@@ -565,23 +581,6 @@ WinSalGraphics::WinSalGraphics():
mfFontScale[ i ] = 1.0;
}
- mfCurrentFontScale = 1.0;
-
- mhLocalDC = 0;
- mhRegion = 0;
- mhDefPen = 0;
- mhDefBrush = 0;
- mhDefFont = 0;
- mhDefPal = 0;
- mpStdClipRgnData = NULL;
- mpLogFont = NULL;
- mpFontCharSets = NULL;
- mpFontAttrCache = NULL;
- mnFontCharSetCount = 0;
- mpFontKernPairs = NULL;
- mnFontKernPairCount = 0;
- mbFontKernInit = FALSE;
- mnPenWidth = GSL_PEN_WIDTH;
static const char* pEnv = getenv("USE_OPENGL");
if (pEnv)
{
@@ -601,8 +600,7 @@ WinSalGraphics::~WinSalGraphics()
}
// delete cache data
- if ( mpStdClipRgnData )
- delete [] mpStdClipRgnData;
+ delete [] mpStdClipRgnData;
delete mpLogFont;