소스 검색

Disable warning C26495 in VS

1vanK 3 년 전
부모
커밋
fc4b71b350
5개의 변경된 파일58개의 추가작업 그리고 7개의 파일을 삭제
  1. 10 0
      Source/Urho3D/Core/Variant.h
  2. 10 0
      Source/Urho3D/Math/Matrix3x4.h
  3. 10 0
      Source/Urho3D/Math/Matrix4.h
  4. 17 7
      Source/Urho3D/Math/Quaternion.h
  5. 11 0
      Source/Urho3D/Resource/JSONValue.h

+ 10 - 0
Source/Urho3D/Core/Variant.h

@@ -292,8 +292,18 @@ union VariantValue
     CustomVariantValue* customValueHeap_;
     CustomVariantValue* customValueHeap_;
     CustomVariantValue customValueStack_;
     CustomVariantValue customValueStack_;
 
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:26495)
+#endif
+
     /// Construct uninitialized.
     /// Construct uninitialized.
     VariantValue() { }      // NOLINT(modernize-use-equals-default)
     VariantValue() { }      // NOLINT(modernize-use-equals-default)
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
     /// Non-copyable.
     /// Non-copyable.
     VariantValue(const VariantValue& value) = delete;
     VariantValue(const VariantValue& value) = delete;
     /// Destruct.
     /// Destruct.

+ 10 - 0
Source/Urho3D/Math/Matrix3x4.h

@@ -16,6 +16,12 @@ namespace Urho3D
 class URHO3D_API Matrix3x4
 class URHO3D_API Matrix3x4
 {
 {
 public:
 public:
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:26495)
+#endif
+
     /// Construct an identity matrix.
     /// Construct an identity matrix.
     Matrix3x4() noexcept
     Matrix3x4() noexcept
 #ifndef URHO3D_SSE
 #ifndef URHO3D_SSE
@@ -155,6 +161,10 @@ public:
 #endif
 #endif
     }
     }
 
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
     /// Assign from another matrix.
     /// Assign from another matrix.
     Matrix3x4& operator =(const Matrix3x4& rhs) noexcept = default;
     Matrix3x4& operator =(const Matrix3x4& rhs) noexcept = default;
 
 

+ 10 - 0
Source/Urho3D/Math/Matrix4.h

@@ -19,6 +19,12 @@ class Matrix3x4;
 class URHO3D_API Matrix4
 class URHO3D_API Matrix4
 {
 {
 public:
 public:
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:26495)
+#endif
+
     /// Construct an identity matrix.
     /// Construct an identity matrix.
     Matrix4() noexcept
     Matrix4() noexcept
 #ifndef URHO3D_SSE
 #ifndef URHO3D_SSE
@@ -151,6 +157,10 @@ public:
 #endif
 #endif
     }
     }
 
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
     /// Assign from another matrix.
     /// Assign from another matrix.
     Matrix4& operator =(const Matrix4& rhs) noexcept
     Matrix4& operator =(const Matrix4& rhs) noexcept
     {
     {

+ 17 - 7
Source/Urho3D/Math/Quaternion.h

@@ -16,6 +16,12 @@ namespace Urho3D
 class URHO3D_API Quaternion
 class URHO3D_API Quaternion
 {
 {
 public:
 public:
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:26495)
+#endif
+
     /// Construct an identity quaternion.
     /// Construct an identity quaternion.
     Quaternion() noexcept
     Quaternion() noexcept
 #ifndef URHO3D_SSE
 #ifndef URHO3D_SSE
@@ -73,6 +79,17 @@ public:
 #endif
 #endif
     }
     }
 
 
+#ifdef URHO3D_SSE
+    explicit Quaternion(__m128 wxyz) noexcept
+    {
+        _mm_storeu_ps(&w_, wxyz);
+    }
+#endif
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
     /// Construct from an angle (in degrees) and axis.
     /// Construct from an angle (in degrees) and axis.
     Quaternion(float angle, const Vector3& axis) noexcept
     Quaternion(float angle, const Vector3& axis) noexcept
     {
     {
@@ -115,13 +132,6 @@ public:
         FromRotationMatrix(matrix);
         FromRotationMatrix(matrix);
     }
     }
 
 
-#ifdef URHO3D_SSE
-    explicit Quaternion(__m128 wxyz) noexcept
-    {
-        _mm_storeu_ps(&w_, wxyz);
-    }
-#endif
-
     /// Assign from another quaternion.
     /// Assign from another quaternion.
     Quaternion& operator =(const Quaternion& rhs) noexcept
     Quaternion& operator =(const Quaternion& rhs) noexcept
     {
     {

+ 11 - 0
Source/Urho3D/Resource/JSONValue.h

@@ -55,11 +55,22 @@ using ConstJSONObjectIterator = JSONObject::ConstIterator;
 class URHO3D_API JSONValue
 class URHO3D_API JSONValue
 {
 {
 public:
 public:
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:26495)
+#endif
+
     /// Construct null value.
     /// Construct null value.
     JSONValue() :
     JSONValue() :
         type_(0)
         type_(0)
     {
     {
     }
     }
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
     /// Construct with a boolean.
     /// Construct with a boolean.
     JSONValue(bool value) :         // NOLINT(google-explicit-constructor)
     JSONValue(bool value) :         // NOLINT(google-explicit-constructor)
         type_(0)
         type_(0)