diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-08-01 18:53:50 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-10-31 17:33:35 +0100 |
commit | 119c372dfff335657c670de50bf156842aba445c (patch) | |
tree | 53aea15245f2bbb7b80e088c09c900cd58b6adc9 | |
parent | 7fb63478bbe582c404dab4c840756f46d83b5403 (diff) |
Dep: Silenced build warning in G3D header
(cherry picked from commit 22653c99f874e189bda6670c42be38151b58e52b)
(cherry picked from commit cce7f1adf2b76c59d8a07f080f23d4b125ed8f15)
(cherry picked from commit d2795c98ddf37ab3a74752ecf54ad65af8541c25)
-rw-r--r-- | dep/g3dlite/G3D-v9.0 hotfix5.diff | 28 | ||||
-rw-r--r-- | dep/g3dlite/Readme.txt | 1 | ||||
-rw-r--r-- | dep/g3dlite/include/G3D/Quat.h | 10 |
3 files changed, 34 insertions, 5 deletions
diff --git a/dep/g3dlite/G3D-v9.0 hotfix5.diff b/dep/g3dlite/G3D-v9.0 hotfix5.diff new file mode 100644 index 00000000000..7bc4073ef62 --- /dev/null +++ b/dep/g3dlite/G3D-v9.0 hotfix5.diff @@ -0,0 +1,28 @@ +diff --git a/dep/g3dlite/include/G3D/Quat.h b/dep/g3dlite/include/G3D/Quat.h +index 04e11e0..b26708a 100644 +--- a/dep/g3dlite/include/G3D/Quat.h ++++ b/dep/g3dlite/include/G3D/Quat.h +@@ -335,8 +335,8 @@ public: + Note that q.pow(a).pow(b) == q.pow(a + b) + @cite Dam98 pg 21 + */ +- inline Quat pow(float x) const { +- return (log() * x).exp(); ++ inline Quat pow(float r) const { ++ return (log() * r).exp(); + } + + /** Make unit length in place */ +@@ -349,9 +349,9 @@ public: + the magnitude. + */ + Quat toUnit() const { +- Quat x = *this; +- x.unitize(); +- return x; ++ Quat copyOfThis = *this; ++ copyOfThis.unitize(); ++ return copyOfThis; + } + + /** diff --git a/dep/g3dlite/Readme.txt b/dep/g3dlite/Readme.txt index 682a2404d96..bcd418d1d0e 100644 --- a/dep/g3dlite/Readme.txt +++ b/dep/g3dlite/Readme.txt @@ -14,3 +14,4 @@ G3D-v9.0 hotfix1.diff - 2014-08-22 - updated to G3D9, reapplied previous patches G3D-v9.0 hotfix2.diff - 2014-08-23 - fix some -Wconversion warnings G3D-v9.0 hotfix3.diff - 2015-06-28 - fix some warnings G3D-v9.0 hotfix4.diff - 2015-07-02 - backport G3D10 fix +G3D-v9.0 hotfix5.diff - 2015-07-31 - fix MSVC 2015 warning: dep/g3dlite/include/G3D/Quat.h(352): warning C4458: declaration of 'x' hides class member diff --git a/dep/g3dlite/include/G3D/Quat.h b/dep/g3dlite/include/G3D/Quat.h index 04e11e084a0..73e661a4f48 100644 --- a/dep/g3dlite/include/G3D/Quat.h +++ b/dep/g3dlite/include/G3D/Quat.h @@ -335,8 +335,8 @@ public: Note that q.pow(a).pow(b) == q.pow(a + b) @cite Dam98 pg 21 */ - inline Quat pow(float x) const { - return (log() * x).exp(); + inline Quat pow(float r) const { + return (log() * r).exp(); } /** Make unit length in place */ @@ -349,9 +349,9 @@ public: the magnitude. */ Quat toUnit() const { - Quat x = *this; - x.unitize(); - return x; + Quat copyOfThis = *this; + copyOfThis.unitize(); + return copyOfThis; } /** |