diff --git a/include/hpp/fcl/mesh_loader/loader.h b/include/hpp/fcl/mesh_loader/loader.h index 934b395e6c901e66cc3780b653091dffa58ad7dc..bc04b05b6edb3da09994879aa22fbe94fd561497 100644 --- a/include/hpp/fcl/mesh_loader/loader.h +++ b/include/hpp/fcl/mesh_loader/loader.h @@ -77,6 +77,8 @@ namespace fcl { Key (const std::string& f, const Vec3f& s, const NODE_TYPE& t) : filename (f), scale (s), bvType (t) {} + + bool operator< (const CachedMeshLoader::Key& b) const; }; typedef std::map <Key, CollisionGeometryPtr_t> Cache_t; diff --git a/src/mesh_loader/loader.cpp b/src/mesh_loader/loader.cpp index 2dca04231df5d993d3e91b4aa6415b23d2b0711f..21392445358aba7903fbaedd130945b371de2837 100644 --- a/src/mesh_loader/loader.cpp +++ b/src/mesh_loader/loader.cpp @@ -42,8 +42,9 @@ namespace hpp { namespace fcl { - bool operator< (const CachedMeshLoader::Key& a, const CachedMeshLoader::Key& b) + bool CachedMeshLoader::Key::operator< (const CachedMeshLoader::Key& b) const { + const CachedMeshLoader::Key& a = *this; if (a.bvType < b.bvType) return true; if (a.bvType > b.bvType) return false; for (int i = 0; i < 3; ++i) {