lottie: modernize using clang-tidy "modernize-use-equals-default" 45/188245/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Mon, 3 Sep 2018 09:10:45 +0000 (18:10 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Mon, 3 Sep 2018 09:10:45 +0000 (18:10 +0900)
Change-Id: Ic09bf5651333f63f2603c8e3d9dd8afd4b73c7aa

src/lottie/lottieitem.h
src/lottie/lottieloader.cpp
src/lottie/lottieloader.h
src/lottie/lottiemodel.h
src/lottie/rapidjson/document.h
src/lottie/rapidjson/internal/ieee754.h
src/vector/vbezier.h
src/vector/vbrush.h
src/vector/vdrawhelper.h
src/vector/vpath.cpp
src/vector/vpath.h

index 83fbda9..0f90c4c 100644 (file)
@@ -55,7 +55,7 @@ class LOTLayerItem
 {
 public:
    LOTLayerItem(LOTLayerData *layerData);
-   virtual ~LOTLayerItem(){}
+   virtual ~LOTLayerItem()= default;
    int id() const {return mLayerData->id();}
    int parentId() const {return mLayerData->parentId();}
    void setParentLayer(LOTLayerItem *parent){mParentLayer = parent;}
@@ -169,8 +169,7 @@ class LOTTrimItem;
 class LOTContentItem
 {
 public:
-   LOTContentItem(){}
-   virtual ~LOTContentItem(){}
+   virtual ~LOTContentItem()= default;
    virtual void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) = 0;
    virtual void renderList(std::vector<VDrawable *> &){}
    void setParent(LOTContentItem *parent) {mParent = parent;}
index b97dd68..a948e4a 100644 (file)
@@ -8,7 +8,6 @@ using namespace std;
 
 class LottieFileCache {
 public:
-    ~LottieFileCache();
     static LottieFileCache &get()
     {
         static LottieFileCache CACHE;
@@ -19,12 +18,11 @@ public:
     void add(std::string &key, std::shared_ptr<LOTModel> value);
 
 private:
-    LottieFileCache() {}
+    LottieFileCache() = default;
 
     std::unordered_map<std::string, std::shared_ptr<LOTModel>> mHash;
 };
 
-LottieFileCache::~LottieFileCache() {}
 std::shared_ptr<LOTModel> LottieFileCache::find(std::string &key)
 {
     auto search = mHash.find(key);
@@ -40,8 +38,6 @@ void LottieFileCache::add(std::string &key, std::shared_ptr<LOTModel> value)
     mHash[key] = value;
 }
 
-LottieLoader::LottieLoader() {}
-
 bool LottieLoader::load(std::string &path)
 {
     LottieFileCache &fileCache = LottieFileCache::get();
index 0c4367b..e87cd79 100644 (file)
@@ -8,7 +8,6 @@ class LOTModel;
 class LottieLoader
 {
 public:
-   LottieLoader();
    bool load(std::string &filePath);
    std::shared_ptr<LOTModel> model();
 private:
index 7d4518e..4abf4e5 100644 (file)
@@ -35,7 +35,7 @@ class LOTMaskData;
 class LOTDataVisitor
 {
 public:
-    virtual ~LOTDataVisitor() {}
+    virtual ~LOTDataVisitor() = default;
     virtual void visit(LOTCompositionData *) = 0;
     virtual void visit(LOTLayerData *) = 0;
     virtual void visit(LOTTransformData *) = 0;
@@ -269,7 +269,7 @@ public:
         Repeater
     };
     LOTData(LOTData::Type  type): mType(type){}
-    virtual ~LOTData(){}
+    virtual ~LOTData()= default;
     inline LOTData::Type type() const {return mType;}
     virtual void accept(LOTDataVisitor *){}
     bool isStatic() const{return mStatic;}
index aeca757..98c4eb1 100644 (file)
@@ -2547,7 +2547,7 @@ public:
 
     GenericArray(const GenericArray& rhs) : value_(rhs.value_) {}
     GenericArray& operator=(const GenericArray& rhs) { value_ = rhs.value_; return *this; }
-    ~GenericArray() {}
+    ~GenericArray() = default;
 
     SizeType Size() const { return value_.Size(); }
     SizeType Capacity() const { return value_.Capacity(); }
@@ -2602,7 +2602,7 @@ public:
 
     GenericObject(const GenericObject& rhs) : value_(rhs.value_) {}
     GenericObject& operator=(const GenericObject& rhs) { value_ = rhs.value_; return *this; }
-    ~GenericObject() {}
+    ~GenericObject() = default;
 
     SizeType MemberCount() const { return value_.MemberCount(); }
     SizeType MemberCapacity() const { return value_.MemberCapacity(); }
index c2684ba..56b2bb1 100644 (file)
@@ -22,7 +22,7 @@ namespace internal {
 
 class Double {
 public:
-    Double() {}
+    Double() = default;
     Double(double d) : d_(d) {}
     Double(uint64_t u) : u_(u) {}
 
index ccb5733..4323616 100644 (file)
@@ -7,7 +7,7 @@ V_BEGIN_NAMESPACE
 
 class VBezier {
 public:
-    VBezier() {}
+    VBezier() = default;
     VPointF     pointAt(float t) const;
     VBezier     onInterval(float t0, float t1) const;
     float       length() const;
index 29711f9..f2e6d21 100644 (file)
@@ -17,7 +17,7 @@ public:
     enum class Type { Linear, Radial };
     VGradient(VGradient::Type type);
     void setStops(const VGradientStops &stops);
-    VGradient() {}
+    VGradient() = default;
 
 public:
     static constexpr int colorTableSize = 1024;
index bf66854..51a068b 100644 (file)
@@ -103,7 +103,7 @@ struct VGradientData {
 struct VSpanData {
     class Pinnable {
     protected:
-        ~Pinnable() {}
+        ~Pinnable() = default;
     };
     enum class Type { None, Solid, LinearGradient, RadialGradient };
 
index 5114603..08e0938 100644 (file)
@@ -8,20 +8,6 @@
 
 V_BEGIN_NAMESPACE
 
-VPath::VPathData::VPathData()
-    : m_points(), m_elements(), m_segments(0), mStartPoint(), mNewSegment(true)
-{
-}
-
-VPath::VPathData::VPathData(const VPathData &o)
-    : m_points(o.m_points),
-      m_elements(o.m_elements),
-      m_segments(o.m_segments),
-      mStartPoint(o.mStartPoint),
-      mNewSegment(o.mNewSegment)
-{
-}
-
 void VPath::VPathData::transform(const VMatrix &m)
 {
     for (auto &i : m_points) {
index 8845b41..24fce59 100644 (file)
@@ -50,8 +50,6 @@ public:
 
 private:
     struct VPathData {
-        VPathData();
-        VPathData(const VPathData &o);
         bool  isEmpty() const { return m_elements.empty(); }
         void  moveTo(float x, float y);
         void  lineTo(float x, float y);