fix warning regarding nested anonymus union
authorsub.mohanty@samsung.com <smohantty@gmail.com>
Thu, 4 Jul 2019 12:49:58 +0000 (21:49 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 10 Jul 2019 01:59:12 +0000 (10:59 +0900)
src/vector/vbrush.h
src/vector/vdrawhelper.h

index 94db6d0..23a7695 100644 (file)
@@ -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;
 };
index a0245d7..9c1b567 100644 (file)
@@ -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;