clean up compiler warnings

Mark or remove unused parameters/variables. Rename variables that shadow
previous declarations. Add macro to generate unique identifiers and use
that for the profile scope variable name.
This commit is contained in:
Hinrik Gylfason
2017-05-31 12:04:59 +00:00
parent c411bf341a
commit eb784a3526
14 changed files with 27 additions and 36 deletions

View File

@ -32,11 +32,13 @@ struct b3Sphere
inline const b3Vec3& b3Sphere::GetVertex(u32 index) const
{
B3_NOT_USED(index);
return vertex;
}
inline u32 b3Sphere::GetSupportVertex(const b3Vec3& direction) const
{
B3_NOT_USED(direction);
return 0;
}

View File

@ -124,7 +124,11 @@ typedef float float32;
# endif
#endif
#define B3_PROFILE(name) b3ProfileScope scope(name)
#define B3_JOIN(a, b) a##b
#define B3_CONCATENATE(a, b) B3_JOIN(a, b)
#define B3_UNIQUE_NAME(name) B3_CONCATENATE(name, __LINE__)
#define B3_PROFILE(name) b3ProfileScope B3_UNIQUE_NAME(scope)(name)
// You should implement this function to use your own memory allocator.
void* b3Alloc(u32 size);

View File

@ -23,7 +23,7 @@
#include <bounce/common/template/array.h>
#include <bounce/dynamics/contacts/manifold.h>
#define B3_NULL_CLUSTER (-1)
#define B3_NULL_CLUSTER (0u - 1u)
// Used for contact cluster reduction.
struct b3ClusterVertex
@ -41,7 +41,7 @@ struct b3Observation
u32 manifold;
u32 manifoldPoint;
b3Vec3 point; // normal
i32 cluster; // normal
u32 cluster; // normal
};
// A group of contact points with a similar contact normal.