From 9f17722afdb8b78e98dfceb498133768739aa86e Mon Sep 17 00:00:00 2001 From: Gawaboumga Date: Fri, 27 Jun 2014 19:11:45 +0200 Subject: [PATCH] Little corrections HashDigest: Simultaneous use of int and short EulerAngles: Use of the macro Geom: cone was missing Former-commit-id: ecc3a586732a6711b57ce3e79c5450ef7327bb5b --- include/Nazara/Core/HashDigest.hpp | 4 ++-- include/Nazara/Math/EulerAngles.inl | 6 +++--- src/Nazara/Core/HashDigest.cpp | 2 +- src/Nazara/Physics/Geom.cpp | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/Nazara/Core/HashDigest.hpp b/include/Nazara/Core/HashDigest.hpp index 8083f2999..9e6459d04 100644 --- a/include/Nazara/Core/HashDigest.hpp +++ b/include/Nazara/Core/HashDigest.hpp @@ -28,7 +28,7 @@ class NAZARA_API NzHashDigest NzString ToHex() const; - nzUInt8 operator[](unsigned short pos) const; + nzUInt8 operator[](unsigned int pos) const; NzHashDigest& operator=(const NzHashDigest& rhs); NzHashDigest& operator=(NzHashDigest&& rhs) noexcept; @@ -45,7 +45,7 @@ class NAZARA_API NzHashDigest private: NzString m_hashName; nzUInt8* m_digest; - unsigned short m_digestLength; + unsigned int m_digestLength; }; #endif // NAZARA_HASHDIGEST_HPP diff --git a/include/Nazara/Math/EulerAngles.inl b/include/Nazara/Math/EulerAngles.inl index 36527087a..a085d99cf 100644 --- a/include/Nazara/Math/EulerAngles.inl +++ b/include/Nazara/Math/EulerAngles.inl @@ -83,9 +83,9 @@ template template void NzEulerAngles::Set(const NzEulerAngles& angles) { - pitch = static_cast(angles.pitch); - yaw = static_cast(angles.yaw); - roll = static_cast(angles.roll); + pitch = F(angles.pitch); + yaw = F(angles.yaw); + roll = F(angles.roll); } template diff --git a/src/Nazara/Core/HashDigest.cpp b/src/Nazara/Core/HashDigest.cpp index 74b80100a..27aa22db3 100644 --- a/src/Nazara/Core/HashDigest.cpp +++ b/src/Nazara/Core/HashDigest.cpp @@ -89,7 +89,7 @@ NzString NzHashDigest::ToHex() const return NzString(new NzString::SharedString(1, length, length, hexOutput)); } -nzUInt8 NzHashDigest::operator[](unsigned short pos) const +nzUInt8 NzHashDigest::operator[](unsigned int pos) const { #if NAZARA_CORE_SAFE if (pos >= m_digestLength) diff --git a/src/Nazara/Physics/Geom.cpp b/src/Nazara/Physics/Geom.cpp index 0eb463ab9..a7e348f07 100644 --- a/src/Nazara/Physics/Geom.cpp +++ b/src/Nazara/Physics/Geom.cpp @@ -17,6 +17,9 @@ namespace case nzPrimitiveType_Box: return new NzBoxGeom(physWorld, primitive.box.lengths, primitive.matrix); + case nzPrimitiveType_Cone: + return new NzConeGeom(physWorld, primitive.cone.length, primitive.cone.radius, primitive.matrix); + case nzPrimitiveType_Plane: return new NzBoxGeom(physWorld, NzVector3f(primitive.plane.size.x, 0.01f, primitive.plane.size.y), primitive.matrix); ///TODO: PlaneGeom?