summaryrefslogtreecommitdiff
path: root/cppcanvas/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-22 22:02:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-23 08:49:32 +0100
commit43f2a7d979eac630309064e5de3af1f22ba168e9 (patch)
treed436846b4b0e1ed7cb34f2e62d4b6d9fb22e90fc /cppcanvas/source
parent802ac3e437bff5bfbc530c91105f0c380abd62fc (diff)
Better make the zero-initialization more explicit
...if initializing these members is necessary at all; a bit hard to tell from the code. Change-Id: I3ddb25c35f0d1b44a092bdb2cb0192ce619f947c
Diffstat (limited to 'cppcanvas/source')
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index bb8f0a84b8fb..97f6e01920eb 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -693,7 +693,12 @@ namespace cppcanvas
case EmfPlusObjectTypeImage:
{
EMFPImage *image;
- aObjects [index] = image = new EMFPImage ();
+ aObjects [index] = image = new EMFPImage;
+ image->type = 0;
+ image->width = 0;
+ image->height = 0;
+ image->stride = 0;
+ image->pixelFormat = 0;
image->Read (rObjectStream, dataSize, bUseWholeStream);
break;
@@ -701,7 +706,10 @@ namespace cppcanvas
case EmfPlusObjectTypeFont:
{
EMFPFont *font;
- aObjects [index] = font = new EMFPFont ();
+ aObjects [index] = font = new EMFPFont;
+ font->emSize = 0;
+ font->sizeUnit = 0;
+ font->fontFlags = 0;
font->Read (rObjectStream);
break;