diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-07-13 18:35:13 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-07-13 18:35:13 +0200 |
commit | 042b1abfd747160085e5acc24a842a076b20ea01 (patch) | |
tree | 3d259bb036a6c95283b558d4f4505db27772a565 | |
parent | e2ec3df27eb49c991d49f91f0481ba44411e4217 (diff) |
Fix warnings related to Vector3::operator= and remove -Wno-deprecated-copy suppression
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 6 | ||||
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 4 | ||||
-rw-r--r-- | dep/g3dlite/G3D-v9.0 hotfix9.diff | 28 | ||||
-rw-r--r-- | dep/g3dlite/include/G3D/Vector3.h | 10 |
4 files changed, 29 insertions, 19 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 8e04f66abb2..bef2c20715a 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -14,12 +14,6 @@ if(WITH_WARNINGS) -Wno-mismatched-tags -Woverloaded-virtual) - if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10) - target_compile_options(trinity-warning-interface - INTERFACE - -Wno-deprecated-copy) # warning in g3d - endif() - message(STATUS "Clang: All warnings enabled") endif() diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index cbb74526795..92f1b81f0a4 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -35,10 +35,6 @@ if(WITH_WARNINGS) -Wfatal-errors -Woverloaded-virtual) - target_compile_options(trinity-warning-interface - INTERFACE - -Wno-deprecated-copy) # warning in g3d - message(STATUS "GCC: All warnings enabled") endif() diff --git a/dep/g3dlite/G3D-v9.0 hotfix9.diff b/dep/g3dlite/G3D-v9.0 hotfix9.diff new file mode 100644 index 00000000000..e07e9cb5c9c --- /dev/null +++ b/dep/g3dlite/G3D-v9.0 hotfix9.diff @@ -0,0 +1,28 @@ +diff --git a/dep/g3dlite/include/G3D/Vector3.h b/dep/g3dlite/include/G3D/Vector3.h +index ef1e39d821..1c42513b45 100644 +--- a/dep/g3dlite/include/G3D/Vector3.h ++++ b/dep/g3dlite/include/G3D/Vector3.h +@@ -128,7 +128,7 @@ public: + Axis primaryAxis() const; + + // assignment and comparison +- Vector3& __fastcall operator= (const Vector3& rkVector); ++ Vector3& operator=(const Vector3& rkVector) = default; + Vector3& operator=(const Any& a); + bool operator== (const Vector3& rkVector) const; + bool operator!= (const Vector3& rkVector) const; +@@ -627,14 +627,6 @@ inline float& Vector3::operator[] (int i) { + } + + +-//---------------------------------------------------------------------------- +-inline Vector3& Vector3::operator= (const Vector3& rkVector) { +- x = rkVector.x; +- y = rkVector.y; +- z = rkVector.z; +- return *this; +-} +- + //---------------------------------------------------------------------------- + + inline bool Vector3::fuzzyEq(const Vector3& other) const { diff --git a/dep/g3dlite/include/G3D/Vector3.h b/dep/g3dlite/include/G3D/Vector3.h index ef1e39d8211..1c42513b45e 100644 --- a/dep/g3dlite/include/G3D/Vector3.h +++ b/dep/g3dlite/include/G3D/Vector3.h @@ -128,7 +128,7 @@ public: Axis primaryAxis() const; // assignment and comparison - Vector3& __fastcall operator= (const Vector3& rkVector); + Vector3& operator=(const Vector3& rkVector) = default; Vector3& operator=(const Any& a); bool operator== (const Vector3& rkVector) const; bool operator!= (const Vector3& rkVector) const; @@ -628,14 +628,6 @@ inline float& Vector3::operator[] (int i) { //---------------------------------------------------------------------------- -inline Vector3& Vector3::operator= (const Vector3& rkVector) { - x = rkVector.x; - y = rkVector.y; - z = rkVector.z; - return *this; -} - -//---------------------------------------------------------------------------- inline bool Vector3::fuzzyEq(const Vector3& other) const { return G3D::fuzzyEq((*this - other).squaredMagnitude(), 0); |