fix warnings

This commit is contained in:
Sébastien Loriot 2023-10-18 11:56:00 +02:00
parent a0ca27e40a
commit 18e233c036
2 changed files with 4 additions and 2 deletions

View File

@ -270,7 +270,9 @@ private:
Word_type image_data(int i, int j, int k)
{
if ( i>=0 && i<image_->xdim() && j>=0 && j<image_->ydim() && k>=0 && k<image_->zdim() )
if ( i>=0 && static_cast<std::size_t>(i)<image_->xdim() &&
j>=0 && static_cast<std::size_t>(j)<image_->ydim() &&
k>=0 && static_cast<std::size_t>(k)<image_->zdim() )
return image_->value(i, j, k);
else
return 0;

View File

@ -973,7 +973,7 @@ void Scene_edit_box_item_priv::remodel_box(const QVector3D &dir)
Q_FOREACH(Scene_edit_box_item::vertex* selected_vertex, selected_vertices )
{
int id = selected_vertex->id;
CGAL_assume(id<8);
CGAL_assume(id<8 && id >=0);
*selected_vertex->x = applyX(id, last_pool[id][0], dir.x());
*selected_vertex->y = applyY(id, last_pool[id][1], dir.y());
*selected_vertex->z = applyZ(id, last_pool[id][2], dir.z());