From 41dfaf0fa5e88545b8dd79a325e040ea2886d690 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Sat, 9 Apr 2016 11:26:43 +0200 Subject: [PATCH] Fix warnings --- src/collision/CollisionDetection.cpp | 1 + src/collision/shapes/HeightFieldShape.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/collision/CollisionDetection.cpp b/src/collision/CollisionDetection.cpp index 9ec45523..6507e187 100644 --- a/src/collision/CollisionDetection.cpp +++ b/src/collision/CollisionDetection.cpp @@ -374,6 +374,7 @@ void CollisionDetection::broadPhaseNotifyOverlappingPair(ProxyShape* shape1, Pro OverlappingPair* newPair = new (mWorld->mMemoryAllocator.allocate(sizeof(OverlappingPair))) OverlappingPair(shape1, shape2, nbMaxManifolds, mWorld->mMemoryAllocator); assert(newPair != NULL); + std::pair::iterator, bool> check = mOverlappingPairs.insert(make_pair(pairID, newPair)); assert(check.second); diff --git a/src/collision/shapes/HeightFieldShape.h b/src/collision/shapes/HeightFieldShape.h index 77c906a3..15b7f270 100644 --- a/src/collision/shapes/HeightFieldShape.h +++ b/src/collision/shapes/HeightFieldShape.h @@ -160,7 +160,7 @@ class HeightFieldShape : public ConcaveShape { public: /// Constructor - HeightFieldShape(int nbWidthGridPoints, int nbLengthGridPoints, decimal minHeight, decimal maxHeight, + HeightFieldShape(int nbGridColumns, int nbGridRows, decimal minHeight, decimal maxHeight, const void* heightFieldData, HeightDataType dataType, int upAxis = 1, decimal integerHeightScale = 1.0f); @@ -226,7 +226,7 @@ inline decimal HeightFieldShape::getHeightAt(int x, int y) const { case HEIGHT_FLOAT_TYPE : return ((float*)mHeightFieldData)[y * mNbColumns + x]; case HEIGHT_DOUBLE_TYPE : return ((double*)mHeightFieldData)[y * mNbColumns + x]; case HEIGHT_INT_TYPE : return ((int*)mHeightFieldData)[y * mNbColumns + x] * mIntegerHeightScale; - default: assert(false); + default: assert(false); return 0; } }