From 7f7c619c856f4c6b8d80b868115bdf0c3a50a589 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 24 Sep 2014 03:39:30 +0000 Subject: [PATCH] avoid duplicate initialization and warnings about initialization order git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 330faf1af8..19722f23de 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -1323,7 +1323,7 @@ void wxCairoBitmapData::InitSurface(cairo_format_t format, int stride) } wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surface_t* bitmap ) : - wxGraphicsBitmapData( renderer ), m_buffer(NULL) + wxGraphicsBitmapData(renderer) { m_surface = bitmap; m_pattern = cairo_pattern_create_for_surface(m_surface); @@ -1333,8 +1333,12 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surfac m_buffer = NULL; } -wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsBitmapData( renderer ), m_buffer(NULL), m_surface(NULL), m_pattern(NULL) +wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) + : wxGraphicsBitmapData(renderer) { + m_surface = NULL; + m_pattern = NULL; + m_buffer = NULL; wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap")); #ifdef wxHAS_RAW_BITMAP