@@ -53,14 +53,14 @@ class GetGeomTraits<CGAL_PMP_NP_CLASS, NP>
5353
5454namespace Polygon_mesh_processing {
5555
56- namespace pmp_internal {
56+ namespace internal {
5757
5858inline void rearrange_face_ids (boost::container::small_vector<std::size_t , 4 >& ids)
5959{
6060 auto min_elem = std::min_element (ids.begin (), ids.end ());
6161 std::rotate (ids.begin (), min_elem, ids.end ());
6262}
63- }// namespace pmp_internal
63+ }// namespace internal
6464/* *
6565 * \ingroup measure_grp
6666 * computes the length of an edge of a given polygon mesh.
@@ -906,6 +906,9 @@ void match_faces(const PolygonMesh1& m1, const PolygonMesh2& m2,
906906 get_const_property_map (vertex_point, m1));
907907 const VPMap2 vpm2 = choose_parameter (get_parameter (np2, internal_np::vertex_point),
908908 get_const_property_map (vertex_point, m2));
909+ CGAL_static_assertion_msg ((boost::is_same<typename boost::property_traits<VPMap1>::value_type,
910+ typename boost::property_traits<VPMap2>::value_type>::value),
911+ " Both vertex point maps must have the same point type." );
909912
910913 const VIMap1 vim1 = get_initialized_vertex_index_map (m1, np1);
911914 const VIMap2 vim2 = get_initialized_vertex_index_map (m2, np2);
@@ -920,15 +923,15 @@ void match_faces(const PolygonMesh1& m1, const PolygonMesh2& m2,
920923 std::size_t id = 0 ;
921924 for (auto v : vertices (m1))
922925 {
923- const Point_3& p = get (vpm1, v);
926+ const typename boost::property_traits<VPMap1>::reference p = get (vpm1, v);
924927 auto res = point_id_map.emplace (p, id);
925928 if (res.second )
926929 ++id;
927930 m1_vertex_id[get (vim1, v)] = res.first ->second ;
928931 }
929932 for (auto v : vertices (m2))
930933 {
931- const Point_3& p = get (vpm2, v);
934+ const typename boost::property_traits<VPMap2>::reference p = get (vpm2, v);
932935 auto res = point_id_map.emplace (p, id);
933936 if (res.second )
934937 ++id;
@@ -955,7 +958,7 @@ void match_faces(const PolygonMesh1& m1, const PolygonMesh2& m2,
955958 }
956959 if (all_shared)
957960 {
958- pmp_internal ::rearrange_face_ids (ids);
961+ internal ::rearrange_face_ids (ids);
959962 m1_faces_map.emplace (ids, f);
960963 }
961964 else
@@ -977,7 +980,7 @@ void match_faces(const PolygonMesh1& m1, const PolygonMesh2& m2,
977980 }
978981 if (all_shared)
979982 {
980- pmp_internal ::rearrange_face_ids (ids);
983+ internal ::rearrange_face_ids (ids);
981984 auto it = m1_faces_map.find (ids);
982985 if (it != m1_faces_map.end ())
983986 {
0 commit comments