Fix warnings in tests caused by integer conversions
This commit is contained in:
parent
621ec86dbe
commit
e44524f1cd
2 changed files with 2 additions and 7 deletions
tests/libslic3r
|
@ -134,7 +134,7 @@ struct CellGridTracer2D_AllDirs {
|
|||
template<class Fn>
|
||||
void foreach_reachable(const Vec2i &src, Fn &&fn) const
|
||||
{
|
||||
auto is_inside = [](const Vec2i& v) { return v.x() >= 0 && v.x() < Cols && v.y() >= 0 && v.y() < Rows; };
|
||||
auto is_inside = [](const Vec2i& v) { return v.x() >= 0 && v.x() < int(Cols) && v.y() >= 0 && v.y() < int(Rows); };
|
||||
if (Vec2i crd = src + Vec2i{0, 1}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
if (Vec2i crd = src + Vec2i{1, 0}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
if (Vec2i crd = src + Vec2i{1, 1}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
|
@ -171,7 +171,7 @@ struct CellGridTracer2D_Axis {
|
|||
template<class Fn>
|
||||
void foreach_reachable(const Vec2i &src, Fn &&fn) const
|
||||
{
|
||||
auto is_inside = [](const Vec2i& v) { return v.x() >= 0 && v.x() < Cols && v.y() >= 0 && v.y() < Rows; };
|
||||
auto is_inside = [](const Vec2i& v) { return v.x() >= 0 && v.x() < int(Cols) && v.y() >= 0 && v.y() < int(Rows); };
|
||||
if (Vec2i crd = src + Vec2i{0, 1}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
if (Vec2i crd = src + Vec2i{0, -1}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
if (Vec2i crd = src + Vec2i{1, 0}; is_inside(crd) && grid[crd.y()] [crd.x()] == ON) fn(crd);
|
||||
|
|
|
@ -31,11 +31,6 @@ static double volume(const BoundingBox3Base<Vec3f> &box)
|
|||
return sz.x() * sz.y() * sz.z();
|
||||
}
|
||||
|
||||
static double volume(const Eigen::AlignedBox<float, 3> &box)
|
||||
{
|
||||
return box.volume();
|
||||
}
|
||||
|
||||
TEST_CASE("Test kdtree query for a Box", "[KDTreeIndirect]")
|
||||
{
|
||||
auto vol = BoundingBox3Base<Vec3f>{{0.f, 0.f, 0.f}, {10.f, 10.f, 10.f}};
|
||||
|
|
Loading…
Reference in a new issue