lottie: fixed warnings generated by '-Wextra' flag.

Change-Id: I73c122f61e628bdbdb6ab98bb68b7d32ab9f4ec0
This commit is contained in:
subhransu mohanty 2018-08-21 13:21:16 +09:00
parent d23e61c69d
commit bfbe3c986a
7 changed files with 26 additions and 26 deletions

View 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

View 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()
{

View 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

View 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 *) {}

View 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:

View 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));
}

View 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: