From 3890b5dff5f62c95ba44255e224800e5b9d29255 Mon Sep 17 00:00:00 2001 From: Engin Manap Date: Fri, 8 Jul 2022 18:15:49 +0200 Subject: [PATCH] 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 --- code/AssetLib/glTF2/glTF2Asset.h | 2 ++ contrib/clipper/clipper.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/code/AssetLib/glTF2/glTF2Asset.h b/code/AssetLib/glTF2/glTF2Asset.h index c597fc951..44ab6c9c8 100644 --- a/code/AssetLib/glTF2/glTF2Asset.h +++ b/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 diff --git a/contrib/clipper/clipper.cpp b/contrib/clipper/clipper.cpp index 857cd1c3e..2d02aff67 100644 --- a/contrib/clipper/clipper.cpp +++ b/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;