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 83fbda9afdcc3f195f7df9a2447673a0f460bff6..0f90c4cd30714627af3aaf54be4a928d45fa2b56 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 b97dd6861df87fe52d460443d69a4c3e043a0ba0..a948e4a3c27379e548f48c55caedbe54ee275b53 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 0c4367b480f09cf8b46c3ebec1a569c73d18ce43..e87cd79d335b9afc549eeddfafa852e355a3734e 100644 (file)
@@ -8,7 +8,6 @@ class LOTModel;
 class LottieLoader
 {
 public:
-   LottieLoader();
    bool load(std::string &filePath);
    std::shared_ptr<LOTModel> model();
 private:
index 7d4518ea0d9f869ceb1a4380aa6d4231dca65dbe..4abf4e5cbc5ae87e2a8eb3930b8d3fbb0bcf8a0d 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 aeca757d5645e4c905bfc72c6782f686ae40eeb5..98c4eb1d9fe71468bc3d172ecd5647928eadd814 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 c2684ba2a35ffa258645a5e88522b4fc706d2c6f..56b2bb16ffa3ea688d47f92e20510f4e1f171a28 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 ccb573374af418e42867a45e3c570cb3908520ab..4323616995d6dea5efc9cffb1b2fe2d9fa4fbf64 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 29711f9537855a659ea8d29e7779d7632496133a..f2e6d217b14dcef3f42bdb7398aa04538f420866 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 bf66854244e472e0c6a46fd707eee75f5ae4af78..51a068b32443a89aee5f26d3fb53a40faae9a7ba 100644 (file)
@@ -103,7 +103,7 @@ struct VGradientData {
 struct VSpanData {
     class Pinnable {
     protected:
-        ~Pinnable() {}
+        ~Pinnable() = default;
     };
     enum class Type { None, Solid, LinearGradient, RadialGradient };
 
index 511460354055aec15f6244603f5a2fea88fdd174..08e0938896134ec307a8f2b21ffcd72a0095d7ee 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 8845b415cff004277f0da78d1a83c3c03aa38595..24fce594a7315ff36c3072cd0fd4702d138a3259 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);