diff options
author | D G Turner | 2019-08-17 05:03:04 +0100 |
---|---|---|
committer | D G Turner | 2019-08-17 05:03:04 +0100 |
commit | d78459f8bc95bea82d5205c0dee07ecfb8425ea1 (patch) | |
tree | a1c662c91bcf6046aae6198e3fbd7ef005cd0882 /graphics | |
parent | a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0 (diff) | |
download | scummvm-rg350-d78459f8bc95bea82d5205c0dee07ecfb8425ea1.tar.gz scummvm-rg350-d78459f8bc95bea82d5205c0dee07ecfb8425ea1.tar.bz2 scummvm-rg350-d78459f8bc95bea82d5205c0dee07ecfb8425ea1.zip |
GUI: Fix GCC Compiler Warnings in GUI Theme Parser Code
This removes the usage of memset to clear complex structures and replaces
them with constructor methods for the structures which will be executed
when these are instantiated.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/VectorRenderer.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 78638200a4..c2f7b40ed0 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -50,6 +50,8 @@ struct DrawStep { struct Color { uint8 r, g, b; bool set; + + Color () : r(0), g(0), b(0), set(false) {} }; Color fgColor; /**< Foreground color */ Color bgColor; /**< background color */ @@ -85,6 +87,23 @@ struct DrawStep { uint32 scale; /**< scale of all the coordinates in FIXED POINT with 16 bits mantissa */ GUI::ThemeEngine::AutoScaleMode autoscale; /**< scale alphaimage if present */ + + DrawStep() { + drawingCall = nullptr; + blitSrc = nullptr; + blitAlphaSrc = nullptr; + // fgColor, bgColor, gradColor1, gradColor2, bevelColor initialized by Color default constructor + autoWidth = autoHeight = false; + x = y = w = h = 0; + // padding initialized by Common::Rect default constructor + xAlign = yAlign = kVectorAlignManual; + shadow = stroke = factor = radius = bevel = 0; + fillMode = 0; + shadowFillMode = 0; + extraData = 0; + scale = 0; + autoscale = GUI::ThemeEngine::kAutoScaleNone; + } }; VectorRenderer *createRenderer(int mode); |