Browse Source

Add missing = operator

implicit assignment operator is depricated, these classes were missing
explicit definitions of this operator.
It is causing warnings, specifically  -Werror=deprecated-copy
Engin Manap 3 years ago
parent
commit
3890b5dff5
2 changed files with 9 additions and 0 deletions
  1. 2 0
      code/AssetLib/glTF2/glTF2Asset.h
  2. 7 0
      contrib/clipper/clipper.cpp

+ 2 - 0
code/AssetLib/glTF2/glTF2Asset.h

@@ -374,6 +374,8 @@ struct CustomExtension {
             mValues(other.mValues) {
         // empty
     }
+
+    CustomExtension& operator=(const CustomExtension&) = default;
 };
 
 //! Base class for all glTF top-level objects

+ 7 - 0
contrib/clipper/clipper.cpp

@@ -86,6 +86,13 @@ class Int128
 
     Int128(const Int128 &val): hi(val.hi), lo(val.lo){}
 
+    Int128 operator = (const Int128 &val)
+    {
+        lo = val.lo;
+        hi = val.hi;
+        return val;
+    }
+
     long64 operator = (const long64 &val)
     {
       lo = val;