summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2015-11-18 11:49:56 -0500
committerGravatar bunnei2015-11-18 11:49:56 -0500
commitf971aceac39b643765c45dfb25827e7ea689bb67 (patch)
tree849e7919afb301eaf56d202083db79a31c139a43
parentMerge pull request #1238 from citra-emu/neobrain-rtti (diff)
parentfix failure on gcc and clang (diff)
downloadyuzu-f971aceac39b643765c45dfb25827e7ea689bb67.tar.gz
yuzu-f971aceac39b643765c45dfb25827e7ea689bb67.tar.xz
yuzu-f971aceac39b643765c45dfb25827e7ea689bb67.zip
Merge pull request #1239 from wwylele/silent-vec-warning
Common: silence Vec warnings on msvc
-rw-r--r--src/common/vector_math.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index 4928c9bf2..02688e35e 100644
--- a/src/common/vector_math.h
+++ b/src/common/vector_math.h
@@ -32,6 +32,7 @@
32#pragma once 32#pragma once
33 33
34#include <cmath> 34#include <cmath>
35#include <type_traits>
35 36
36namespace Math { 37namespace Math {
37 38
@@ -90,6 +91,7 @@ public:
90 { 91 {
91 x-=other.x; y-=other.y; 92 x-=other.x; y-=other.y;
92 } 93 }
94 template<typename Q = T,class = typename std::enable_if<std::is_signed<Q>::value>::type>
93 Vec2<decltype(-T{})> operator -() const 95 Vec2<decltype(-T{})> operator -() const
94 { 96 {
95 return MakeVec(-x,-y); 97 return MakeVec(-x,-y);
@@ -220,6 +222,7 @@ public:
220 { 222 {
221 x-=other.x; y-=other.y; z-=other.z; 223 x-=other.x; y-=other.y; z-=other.z;
222 } 224 }
225 template<typename Q = T,class = typename std::enable_if<std::is_signed<Q>::value>::type>
223 Vec3<decltype(-T{})> operator -() const 226 Vec3<decltype(-T{})> operator -() const
224 { 227 {
225 return MakeVec(-x,-y,-z); 228 return MakeVec(-x,-y,-z);
@@ -390,6 +393,7 @@ public:
390 { 393 {
391 x-=other.x; y-=other.y; z-=other.z; w-=other.w; 394 x-=other.x; y-=other.y; z-=other.z; w-=other.w;
392 } 395 }
396 template<typename Q = T,class = typename std::enable_if<std::is_signed<Q>::value>::type>
393 Vec4<decltype(-T{})> operator -() const 397 Vec4<decltype(-T{})> operator -() const
394 { 398 {
395 return MakeVec(-x,-y,-z,-w); 399 return MakeVec(-x,-y,-z,-w);