From 4552c512f5f4344f67c125a011dda0ad6b2d9a3d Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Tue, 27 Aug 2019 15:57:30 +0200
Subject: [PATCH] Minor change.

---
 include/hpp/fcl/BVH/BVH_model.h  | 2 ++
 include/hpp/fcl/collision_data.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/hpp/fcl/BVH/BVH_model.h b/include/hpp/fcl/BVH/BVH_model.h
index c07cd818..b1d4892d 100644
--- a/include/hpp/fcl/BVH/BVH_model.h
+++ b/include/hpp/fcl/BVH/BVH_model.h
@@ -107,12 +107,14 @@ public:
   /// @brief Access the bv giving the its index
   const BVNode<BV>& getBV(int id) const
   {
+    assert (id < num_bvs);
     return bvs[id];
   }
 
   /// @brief Access the bv giving the its index
   BVNode<BV>& getBV(int id)
   {
+    assert (id < num_bvs);
     return bvs[id];
   }
 
diff --git a/include/hpp/fcl/collision_data.h b/include/hpp/fcl/collision_data.h
index 88ed5d23..fc61c366 100644
--- a/include/hpp/fcl/collision_data.h
+++ b/include/hpp/fcl/collision_data.h
@@ -259,7 +259,7 @@ public:
   }
 
   /// @brief get all the contacts
-  void getContacts(std::vector<Contact>& contacts_)
+  void getContacts(std::vector<Contact>& contacts_) const
   {
     contacts_.resize(contacts.size());
     std::copy(contacts.begin(), contacts.end(), contacts_.begin());
-- 
GitLab