Skip to content

Commit

Permalink
all: more warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarpent committed Nov 4, 2021
1 parent 56f88cf commit 71a5c39
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions include/hpp/fcl/shape/geometric_shape_to_BVH_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ void generateBVHModel(BVHModel<BV>& model, const Cylinder& shape, const Transfor
{
for(unsigned int j = 0; j < tot; ++j)
{
int a, b, c, d;
unsigned int a, b, c, d;
a = j;
b = (j == tot - 1) ? 0 : (j + 1);
c = j + tot;
d = (j == tot - 1) ? tot : (j + 1 + tot);

int start = i * tot;
unsigned int start = i * tot;
tri_indices.push_back(Triangle(start + b, start + a, start + c));
tri_indices.push_back(Triangle(start + b, start + c, start + d));
}
Expand Down Expand Up @@ -311,13 +311,13 @@ void generateBVHModel(BVHModel<BV>& model, const Cone& shape, const Transform3f&
{
for(unsigned int j = 0; j < tot; ++j)
{
int a, b, c, d;
unsigned int a, b, c, d;
a = j;
b = (j == tot - 1) ? 0 : (j + 1);
c = j + tot;
d = (j == tot - 1) ? tot : (j + 1 + tot);

int start = i * tot;
unsigned int start = i * tot;
tri_indices.push_back(Triangle(start + b, start + a, start + c));
tri_indices.push_back(Triangle(start + b, start + c, start + d));
}
Expand Down
6 changes: 3 additions & 3 deletions include/hpp/fcl/shape/geometric_shapes.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class HPP_FCL_DLLAPI ConvexBase : public ShapeBase
/// Qhull.
/// \note hpp-fcl must have been compiled with option \c HPP_FCL_HAS_QHULL set
/// to \c ON.
static ConvexBase* convexHull (const Vec3f* points, int num_points,
static ConvexBase* convexHull (const Vec3f* points, unsigned int num_points,
bool keepTriangles, const char* qhullCommand = NULL);

virtual ~ConvexBase();
Expand Down Expand Up @@ -396,7 +396,7 @@ class HPP_FCL_DLLAPI ConvexBase : public ShapeBase

/// @brief An array of the points of the polygon.
Vec3f* points;
int num_points;
unsigned int num_points;

struct HPP_FCL_DLLAPI Neighbors
{
Expand Down Expand Up @@ -427,7 +427,7 @@ class HPP_FCL_DLLAPI ConvexBase : public ShapeBase
/// \param ownStorage weither the ConvexBase owns the data.
/// \param points_ list of 3D points ///
/// \param num_points_ number of 3D points
void initialize(bool ownStorage, Vec3f* points_, int num_points_);
void initialize(bool ownStorage, Vec3f* points_, unsigned int num_points_);

/// @brief Copy constructor
/// Only the list of neighbors is copied.
Expand Down
4 changes: 2 additions & 2 deletions src/narrowphase/details.h
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,7 @@ namespace fcl {
Vec3f v;
FCL_REAL depth = (std::numeric_limits<FCL_REAL>::max)();

for(int i = 0; i < s1.num_points; ++i)
for(unsigned int i = 0; i < s1.num_points; ++i)
{
Vec3f p = tf1.transform(s1.points[i]);

Expand Down Expand Up @@ -2466,7 +2466,7 @@ namespace fcl {
Vec3f v_min, v_max;
FCL_REAL d_min = (std::numeric_limits<FCL_REAL>::max)(), d_max = -(std::numeric_limits<FCL_REAL>::max)();

for(int i = 0; i < s1.num_points; ++i)
for(unsigned int i = 0; i < s1.num_points; ++i)
{
Vec3f p = tf1.transform(s1.points[i]);

Expand Down
2 changes: 1 addition & 1 deletion src/shape/convex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using orgQhull::QhullRidgeSet;
namespace hpp {
namespace fcl {

ConvexBase* ConvexBase::convexHull(const Vec3f* pts, int num_points,
ConvexBase* ConvexBase::convexHull(const Vec3f* pts, unsigned int num_points,
bool keepTriangles, const char* qhullCommand)
{
#ifdef HPP_FCL_HAS_QHULL
Expand Down
2 changes: 1 addition & 1 deletion src/shape/geometric_shapes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace hpp
namespace fcl
{

void ConvexBase::initialize(bool own_storage, Vec3f* points_, int num_points_)
void ConvexBase::initialize(bool own_storage, Vec3f* points_, unsigned int num_points_)
{
points = points_;
num_points = num_points_;
Expand Down

0 comments on commit 71a5c39

Please sign in to comment.