comment out each unused parameter

Signed-off-by: DNKpp <DNKpp2011@gmail.com>
This commit is contained in:
DNKpp 2020-08-25 23:05:47 +02:00
parent f8975140b0
commit 165097a161
17 changed files with 21 additions and 21 deletions

View File

@ -185,7 +185,7 @@ inline Vector3 BoxShape::getLocalSupportPointWithoutMargin(const Vector3& direct
}
// Return true if a point is inside the collision shape
inline bool BoxShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
inline bool BoxShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
return (localPoint.x < mHalfExtents[0] && localPoint.x > -mHalfExtents[0] &&
localPoint.y < mHalfExtents[1] && localPoint.y > -mHalfExtents[1] &&
localPoint.z < mHalfExtents[2] && localPoint.z > -mHalfExtents[2]);

View File

@ -130,7 +130,7 @@ inline bool ConcaveShape::isPolyhedron() const {
}
// Return true if a point is inside the collision shape
inline bool ConcaveShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
inline bool ConcaveShape::testPointInside(const Vector3& /*localPoint*/, Collider* /*collider*/) const {
return false;
}

View File

@ -145,7 +145,7 @@ inline size_t SphereShape::getSizeInBytes() const {
}
// Return a local support point in a given direction without the object margin
inline Vector3 SphereShape::getLocalSupportPointWithoutMargin(const Vector3& direction) const {
inline Vector3 SphereShape::getLocalSupportPointWithoutMargin(const Vector3& /*direction*/) const {
// Return the center of the sphere (the radius is taken into account in the object margin)
return Vector3(0.0, 0.0, 0.0);
@ -185,7 +185,7 @@ inline decimal SphereShape::getVolume() const {
}
// Return true if a point is inside the collision shape
inline bool SphereShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
inline bool SphereShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
return (localPoint.lengthSquare() < mMargin * mMargin);
}

View File

@ -222,12 +222,12 @@ inline void TriangleShape::getLocalBounds(Vector3& min, Vector3& max) const {
* coordinates
* @param mass Mass to use to compute the inertia tensor of the collision shape
*/
inline Vector3 TriangleShape::getLocalInertiaTensor(decimal mass) const {
inline Vector3 TriangleShape::getLocalInertiaTensor(decimal /*mass*/) const {
return Vector3(0, 0, 0);
}
// Return true if a point is inside the collision shape
inline bool TriangleShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
inline bool TriangleShape::testPointInside(const Vector3& /*localPoint*/, Collider* /*collider*/) const {
return false;
}

View File

@ -55,13 +55,13 @@ class EventListener : public CollisionCallback {
/**
* @param callbackData Contains information about all the contacts
*/
virtual void onContact(const CollisionCallback::CallbackData& callbackData) override {}
virtual void onContact(const CollisionCallback::CallbackData& /*callbackData*/) override {}
/// Called when some trigger events occur
/**
* @param callbackData Contains information about all the triggers that are colliding
*/
virtual void onTrigger(const OverlapCallback::CallbackData& callbackData) {}
virtual void onTrigger(const OverlapCallback::CallbackData& /*callbackData*/) {}
};
}

View File

@ -56,7 +56,7 @@ class DefaultAllocator : public MemoryAllocator {
}
/// Release previously allocated memory.
virtual void release(void* pointer, size_t size) override {
virtual void release(void* pointer, size_t /*size*/) override {
std::free(pointer);
}
};

View File

@ -35,7 +35,7 @@ using namespace reactphysics3d;
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
// by Dirk Gregorius.
bool CapsuleVsCapsuleAlgorithm::testCollision(CapsuleVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
MemoryAllocator& memoryAllocator) {
MemoryAllocator& /*memoryAllocator*/) {
bool isCollisionFound = false;

View File

@ -36,7 +36,7 @@ using namespace reactphysics3d;
// This technique is based on the "Robust Contact Creation for Physics Simulations" presentation
// by Dirk Gregorius.
bool SphereVsCapsuleAlgorithm::testCollision(SphereVsCapsuleNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems,
MemoryAllocator& memoryAllocator) {
MemoryAllocator& /*memoryAllocator*/) {
bool isCollisionFound = false;

View File

@ -31,7 +31,7 @@
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
bool SphereVsSphereAlgorithm::testCollision(SphereVsSphereNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems, MemoryAllocator& memoryAllocator) {
bool SphereVsSphereAlgorithm::testCollision(SphereVsSphereNarrowPhaseInfoBatch& narrowPhaseInfoBatch, size_t batchStartIndex, size_t batchNbItems, MemoryAllocator& /*memoryAllocator*/) {
bool isCollisionFound = false;

View File

@ -92,7 +92,7 @@ Vector3 BoxShape::getLocalInertiaTensor(decimal mass) const {
}
// Raycast method with feedback information
bool BoxShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
bool BoxShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
Vector3 rayDirection = ray.point2 - ray.point1;
decimal tMin = DECIMAL_SMALLEST;

View File

@ -67,7 +67,7 @@ Vector3 CapsuleShape::getLocalInertiaTensor(decimal mass) const {
}
// Return true if a point is inside the collision shape
bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* collider) const {
bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* /*collider*/) const {
const decimal diffYCenterSphere1 = localPoint.y - mHalfHeight;
const decimal diffYCenterSphere2 = localPoint.y + mHalfHeight;
@ -83,7 +83,7 @@ bool CapsuleShape::testPointInside(const Vector3& localPoint, Collider* collider
}
// Raycast method with feedback information
bool CapsuleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
bool CapsuleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
const Vector3 n = ray.point2 - ray.point1;

View File

@ -106,7 +106,7 @@ void ConvexMeshShape::recalculateBounds() {
// Raycast method with feedback information
/// This method implements the technique in the book "Real-time Collision Detection" by
/// Christer Ericson.
bool ConvexMeshShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
bool ConvexMeshShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* /*collider*/, MemoryAllocator& /*allocator*/) const {
// Ray direction
Vector3 direction = ray.point2 - ray.point1;

View File

@ -93,7 +93,7 @@ void HeightFieldShape::getLocalBounds(Vector3& min, Vector3& max) const {
// and then for each rectangle in the sub-grid we generate two triangles that we use to test collision.
void HeightFieldShape::computeOverlappingTriangles(const AABB& localAABB, List<Vector3>& triangleVertices,
List<Vector3>& triangleVerticesNormals, List<uint>& shapeIds,
MemoryAllocator& allocator) const {
MemoryAllocator& /*allocator*/) const {
RP3D_PROFILE("HeightFieldShape::computeOverlappingTriangles()", mProfiler);

View File

@ -60,7 +60,7 @@ void SphereShape::computeAABB(AABB& aabb, const Transform& transform) const {
}
// Raycast method with feedback information
bool SphereShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
bool SphereShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
const Vector3 m = ray.point1;
decimal c = m.dot(m) - mMargin * mMargin;

View File

@ -246,7 +246,7 @@ void TriangleShape::computeAABB(AABB& aabb, const Transform& transform) const {
// Raycast method with feedback information
/// This method use the line vs triangle raycasting technique described in
/// Real-time Collision Detection by Christer Ericson.
bool TriangleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& allocator) const {
bool TriangleShape::raycast(const Ray& ray, RaycastInfo& raycastInfo, Collider* collider, MemoryAllocator& /*allocator*/) const {
RP3D_PROFILE("TriangleShape::raycast()", mProfiler);

View File

@ -50,7 +50,7 @@ uint PhysicsWorld::mNbWorlds = 0;
* @param worldSettings The settings of the world
* @param profiler Pointer to the profiler
*/
PhysicsWorld::PhysicsWorld(MemoryManager& memoryManager, const WorldSettings& worldSettings, Profiler* profiler)
PhysicsWorld::PhysicsWorld(MemoryManager& memoryManager, const WorldSettings& worldSettings, Profiler* /*profiler*/)
: mMemoryManager(memoryManager), mConfig(worldSettings), mEntityManager(mMemoryManager.getHeapAllocator()), mDebugRenderer(mMemoryManager.getHeapAllocator()),
mCollisionBodyComponents(mMemoryManager.getHeapAllocator()), mRigidBodyComponents(mMemoryManager.getHeapAllocator()),
mTransformComponents(mMemoryManager.getHeapAllocator()), mCollidersComponents(mMemoryManager.getHeapAllocator()),

View File

@ -153,7 +153,7 @@ void BroadPhaseSystem::updateColliderInternal(int32 broadPhaseId, Collider* coll
}
// Update the broad-phase state of some colliders components
void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems, decimal timeStep) {
void BroadPhaseSystem::updateCollidersComponents(uint32 startIndex, uint32 nbItems, decimal /*timeStep*/) {
RP3D_PROFILE("BroadPhaseSystem::updateCollidersComponents()", mProfiler);