From d0b3aa86dd30d95281d298306a4512451902cbc9 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Tue, 14 Aug 2018 11:00:15 +0900 Subject: [PATCH] lottie/render: Fixed valgrind warning for uninitialize member variable. Change-Id: I3c985c00b54d91b936c401febe9dff0d766e1793 --- src/lottie/lottieitem.h | 18 +++++++++--------- src/lottie/lottiemodel.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h index 9a5c486..eebc24e 100644 --- a/src/lottie/lottieitem.h +++ b/src/lottie/lottieitem.h @@ -238,7 +238,7 @@ protected: LOTRectData *mData; struct Cache { - int mFrameNo; + int mFrameNo{-1}; VPointF mPos; VPointF mSize; float mRoundness; @@ -276,7 +276,7 @@ private: LOTEllipseData *mData; struct Cache { - int mFrameNo; + int mFrameNo{-1}; VPointF mPos; VPointF mSize; }; @@ -320,14 +320,14 @@ private: LOTPolystarData *mData; struct Cache { - int mFrameNo; + int mFrameNo{-1}; VPointF mPos; - float mPoints; - float mInnerRadius; - float mOuterRadius; - float mInnerRoundness; - float mOuterRoundness; - float mRotation; + float mPoints{0}; + float mInnerRadius{0}; + float mOuterRadius{0}; + float mInnerRoundness{0}; + float mOuterRoundness{0}; + float mRotation{0}; }; Cache mCache; diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h index 8d9df61..b9dba2c 100644 --- a/src/lottie/lottiemodel.h +++ b/src/lottie/lottiemodel.h @@ -453,7 +453,7 @@ public: LOTAnimatable mWidth; /* "w" */ CapStyle mCapStyle; /* "lc" */ JoinStyle mJoinStyle; /* "lj" */ - float mMeterLimit; /* "ml" */ + float mMeterLimit{0}; /* "ml" */ LOTDashProperty mDash; bool mEnabled = true; /* "fillEnabled" */ }; @@ -562,7 +562,7 @@ public: LOTAnimatable mWidth; /* "w" */ CapStyle mCapStyle; /* "lc" */ JoinStyle mJoinStyle; /* "lj" */ - float mMeterLimit; /* "ml" */ + float mMeterLimit{0}; /* "ml" */ LOTDashProperty mDash; }; -- 2.34.1