diff --git a/include/hpp/fcl/shape/geometric_shapes.h b/include/hpp/fcl/shape/geometric_shapes.h index 5dd9a57ac..151f286bd 100644 --- a/include/hpp/fcl/shape/geometric_shapes.h +++ b/include/hpp/fcl/shape/geometric_shapes.h @@ -55,7 +55,7 @@ class HPP_FCL_DLLAPI ShapeBase : public CollisionGeometry { /// \brief Copy constructor ShapeBase(const ShapeBase& other) : CollisionGeometry(other) {} - ShapeBase& operator=(const ShapeBase& /*other*/) { return *this; } + ShapeBase& operator=(const ShapeBase& other) = default; virtual ~ShapeBase(){}; diff --git a/test/bvh_models.cpp b/test/bvh_models.cpp index 38bac56cb..c708a2f91 100644 --- a/test/bvh_models.cpp +++ b/test/bvh_models.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include "utility.h" @@ -370,3 +371,14 @@ BOOST_AUTO_TEST_CASE(load_illformated_mesh) { MeshLoader loader; BOOST_CHECK_NO_THROW(loader.load(filename)); } + +BOOST_AUTO_TEST_CASE(test_convex) { + Box* box_ptr = new hpp::fcl::Box(1, 1, 1); + CollisionGeometryPtr_t b1(box_ptr); + BVHModel box_bvh_model = BVHModel(); + generateBVHModel(box_bvh_model, *box_ptr, Transform3f()); + box_bvh_model.buildConvexRepresentation(false); + + std::shared_ptr convex_copy(box_bvh_model.convex->clone()); + BOOST_CHECK(*convex_copy.get() == *box_bvh_model.convex.get()); +}