From 4d61e8fd01d9c14c30fe94e0183824e01f76b663 Mon Sep 17 00:00:00 2001 From: "sub.mohanty@samsung.com" Date: Thu, 4 Jul 2019 21:49:58 +0900 Subject: [PATCH] fix warning regarding nested anonymus union --- src/vector/vbrush.h | 14 ++++++++------ src/vector/vdrawhelper.h | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/vector/vbrush.h b/src/vector/vbrush.h index 94db6d08f9..23a7695526 100644 --- a/src/vector/vbrush.h +++ b/src/vector/vbrush.h @@ -47,13 +47,15 @@ public: VGradient::Mode mMode; VGradientStops mStops; float mAlpha{1.0}; + struct Linear{ + float x1, y1, x2, y2; + }; + struct Radial{ + float cx, cy, fx, fy, cradius, fradius; + }; union { - struct { - float x1, y1, x2, y2; - } linear; - struct { - float cx, cy, fx, fy, cradius, fradius; - } radial; + Linear linear; + Radial radial; }; VMatrix mMatrix; }; diff --git a/src/vector/vdrawhelper.h b/src/vector/vdrawhelper.h index a0245d7784..9c1b567d41 100644 --- a/src/vector/vdrawhelper.h +++ b/src/vector/vdrawhelper.h @@ -103,13 +103,15 @@ private: struct VGradientData { VGradient::Spread mSpread; + struct Linear{ + float x1, y1, x2, y2; + }; + struct Radial{ + float cx, cy, fx, fy, cradius, fradius; + }; union { - struct { - float x1, y1, x2, y2; - } linear; - struct { - float cx, cy, fx, fy, cradius, fradius; - } radial; + Linear linear; + Radial radial; }; const uint32_t *mColorTable; bool mColorTableAlpha;