renderer: initialize members.
authorHermet Park <chuneon.park@samsung.com>
Wed, 7 Apr 2021 02:53:22 +0000 (11:53 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 7 Apr 2021 03:08:22 +0000 (12:08 +0900)
to shutdown annoyed code analizer detections.

Change-Id: I523d61dc2924d1e02a125477306c620f02292076

src/renderer/tvg_renderer.hpp

index e5a71f4..987729d 100644 (file)
@@ -17,14 +17,13 @@ namespace rive
    struct RIVE_EXPORT TvgPaint
    {
       uint8_t color[4];
-      float thickness;
-      tvg::Fill *gradientFill;
+      float thickness = 1.0f;
+      tvg::Fill *gradientFill = nullptr;
       tvg::StrokeJoin join = tvg::StrokeJoin::Bevel;
       tvg::StrokeCap  cap = tvg::StrokeCap::Butt;
-      RenderPaintStyle style;
-      bool isGradient;
-      bool gradientApplied;
-      TvgPaint() : isGradient(false), gradientApplied(false) {}
+      RenderPaintStyle style = RenderPaintStyle::fill;
+      bool isGradient = false;
+      bool gradientApplied = false;
    };
 
    struct RIVE_EXPORT TvgRenderPath : public RenderPath
@@ -125,4 +124,4 @@ namespace rive
    };
 }
 
-#endif
\ No newline at end of file
+#endif