mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Fix warnings related to Vector3::operator= and remove -Wno-deprecated-copy suppression
(cherry picked from commit 042b1abfd7)
This commit is contained in:
@@ -16,15 +16,6 @@ if(WITH_WARNINGS)
|
||||
-Wno-mismatched-tags
|
||||
-Woverloaded-virtual)
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wno-deprecated-copy")
|
||||
check_cxx_source_compiles("int main() { return 0; }" CLANG_HAS_DEPRECATED_COPY)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
if(CLANG_HAS_DEPRECATED_COPY)
|
||||
target_compile_options(trinity-warning-interface
|
||||
INTERFACE
|
||||
-Wno-deprecated-copy) # warning in g3d
|
||||
endif()
|
||||
|
||||
message(STATUS "Clang: All warnings enabled")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
28
dep/g3dlite/G3D-v9.0 hotfix9.diff
Normal file
28
dep/g3dlite/G3D-v9.0 hotfix9.diff
Normal file
@@ -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 {
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user