lottie: fixed warnings generated by '-Wextra' flag. 15/187215/3
authorsubhransu mohanty <sub.mohanty@samsung.com>
Tue, 21 Aug 2018 04:21:16 +0000 (13:21 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Tue, 21 Aug 2018 04:26:08 +0000 (13:26 +0900)
Change-Id: I73c122f61e628bdbdb6ab98bb68b7d32ab9f4ec0

inc/lotplayer.h
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h
src/lottie/lottiemodel.cpp
src/vector/vdrawhelper.cpp
src/vector/vpoint.h
src/vector/vrect.h

index 4fa589f..66fabf8 100644 (file)
@@ -33,7 +33,7 @@ public:
     bool              renderSync(float pos, LOTBuffer buffer, bool forceRender = false);
 
 private:
-    _LOT_PLAYER_DECLARE_PRIVATE(LOTPlayer);
+    _LOT_PLAYER_DECLARE_PRIVATE(LOTPlayer)
 };
 
 }  // namespace lotplayer
index 3c262e5..dc0f2b4 100644 (file)
@@ -126,7 +126,7 @@ bool LOTCompItem::render(const LOTBuffer &buffer)
 }
 
 void LOTMaskItem::update(int frameNo, const VMatrix &parentMatrix,
-                         float parentAlpha, const DirtyFlag &flag)
+                         float parentAlpha, const DirtyFlag &/*flag*/)
 {
     if (mData->mShape.isStatic()) {
         if (mLocalPath.isEmpty()) {
@@ -846,8 +846,8 @@ void LOTGFillItem::updateContent(int frameNo)
     mFillRule = mData->fillRule();
 }
 
-void LOTGFillItem::updateRenderNode(LOTPathDataItem *pathNode,
-                                    VDrawable *drawable, bool sameParent)
+void LOTGFillItem::updateRenderNode(LOTPathDataItem */*pathNode*/,
+                                    VDrawable *drawable, bool /*sameParent*/)
 {
     drawable->setBrush(VBrush(mGradient.get()));
     drawable->setFillRule(mFillRule);
@@ -925,8 +925,8 @@ void LOTGStrokeItem::updateContent(int frameNo)
     }
 }
 
-void LOTGStrokeItem::updateRenderNode(LOTPathDataItem *pathNode,
-                                      VDrawable *drawable, bool sameParent)
+void LOTGStrokeItem::updateRenderNode(LOTPathDataItem */*pathNode*/,
+                                      VDrawable *drawable, bool /*sameParent*/)
 {
     float scale = getScale(mParentMatrix);
     drawable->setBrush(VBrush(mGradient.get()));
@@ -941,19 +941,19 @@ void LOTGStrokeItem::updateRenderNode(LOTPathDataItem *pathNode,
 
 LOTTrimItem::LOTTrimItem(LOTTrimData *data) : mData(data) {}
 
-void LOTTrimItem::update(int frameNo, const VMatrix &parentMatrix,
-                         float parentAlpha, const DirtyFlag &flag)
+void LOTTrimItem::update(int /*frameNo*/, const VMatrix &/*parentMatrix*/,
+                         float /*parentAlpha*/, const DirtyFlag &/*flag*/)
 {
 }
 
 LOTRepeaterItem::LOTRepeaterItem(LOTRepeaterData *data) : mData(data) {}
 
-void LOTRepeaterItem::update(int frameNo, const VMatrix &parentMatrix,
-                             float parentAlpha, const DirtyFlag &flag)
+void LOTRepeaterItem::update(int /*frameNo*/, const VMatrix &/*parentMatrix*/,
+                             float /*parentAlpha*/, const DirtyFlag &/*flag*/)
 {
 }
 
-void LOTRepeaterItem::renderList(std::vector<VDrawable *> &list) {}
+void LOTRepeaterItem::renderList(std::vector<VDrawable *> &/*list*/) {}
 
 void LOTDrawable::sync()
 {
index 6dc0385..5271cdd 100644 (file)
@@ -62,7 +62,7 @@ public:
    void setPrecompLayer(LOTLayerItem *precomp){mPrecompLayer = precomp;}
    virtual void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha);
    VMatrix matrix(int frameNo) const;
-   virtual void renderList(std::vector<VDrawable *> &list){}
+   virtual void renderList(std::vector<VDrawable *> &){}
    virtual void updateStaticProperty();
    virtual void render(VPainter *painter, const VRle &mask, const VRle &inheritMatte, LOTLayerItem *matteSource);
    bool hasMatte() { if (mLayerData->mMatteType == MatteType::None) return false; return true; }
@@ -181,7 +181,7 @@ public:
    LOTContentItem(){}
    virtual ~LOTContentItem(){}
    virtual void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) = 0;
-   virtual void renderList(std::vector<VDrawable *> &list){}
+   virtual void renderList(std::vector<VDrawable *> &){}
 };
 
 class LOTContentGroupItem: public LOTContentItem
@@ -304,7 +304,7 @@ public:
 private:
    void updatePath(VPath& path, int frameNo) final;
    LOTShapeData             *mData;
-   bool hasChanged(int frameNo) final { return true; }
+   bool hasChanged(int) final { return true; }
 };
 
 class LOTPolystarItem: public LOTPathDataItem
index c119950..2e48fac 100644 (file)
@@ -5,10 +5,10 @@
 class LottieRepeaterProcesser : public LOTDataVisitor {
 public:
     LottieRepeaterProcesser() : mRepeaterFound(false) {}
-    void visit(LOTCompositionData *obj) {}
-    void visit(LOTLayerData *obj) {}
+    void visit(LOTCompositionData *) {}
+    void visit(LOTLayerData *) {}
     void visit(LOTTransformData *) {}
-    void visit(LOTShapeGroupData *obj) {}
+    void visit(LOTShapeGroupData *) {}
     void visit(LOTShapeData *) {}
     void visit(LOTRectData *) {}
     void visit(LOTEllipseData *) {}
index ee421e0..315b59b 100644 (file)
@@ -452,7 +452,7 @@ void fetch_radial_gradient(uint32_t *buffer, const Operator *op,
 }
 
 static inline Operator getOperator(const VSpanData * data,
-                                   const VRle::Span *spans, int spanCount)
+                                   const VRle::Span *, int)
 {
     Operator op;
     bool     solidSource = false;
@@ -542,8 +542,8 @@ static void blendGradientARGB(int count, const VRle::Span *spans,
     }
 }
 
-void VSpanData::setup(const VBrush &brush, VPainter::CompositionMode mode,
-                      int alpha)
+void VSpanData::setup(const VBrush &brush, VPainter::CompositionMode /*mode*/,
+                      int /*alpha*/)
 {
     switch (brush.type()) {
     case VBrush::Type::NoBrush:
index fea5603..2ee01f0 100644 (file)
@@ -22,7 +22,7 @@ public:
     {
         return VPointF(p1.mx + p2.mx, p1.my + p2.my);
     }
-    inline friend const bool fuzzyCompare(const VPointF &p1, const VPointF &p2);
+    inline friend bool fuzzyCompare(const VPointF &p1, const VPointF &p2);
     inline friend VDebug &   operator<<(VDebug &os, const VPointF &o);
 
     friend inline VPointF       operator-(const VPointF &p1, const VPointF &p2);
@@ -36,7 +36,7 @@ private:
     float my;
 };
 
-inline const bool fuzzyCompare(const VPointF &p1, const VPointF &p2)
+inline bool fuzzyCompare(const VPointF &p1, const VPointF &p2)
 {
     return (vCompare(p1.mx, p2.mx) && vCompare(p1.my, p2.my));
 }
index 0a2efdd..eea0b81 100644 (file)
@@ -175,10 +175,10 @@ public:
     inline void setHeight(float h) { y2 = y1 + h; }
     inline void translate(float dx, float dy)
     {
-        x1 -= dx;
-        x2 -= dx;
-        y1 -= dx;
-        y2 -= dx;
+        x1 += dx;
+        y1 += dy;
+        x2 += dx;
+        y2 += dy;
     }
 
 private: