diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 32ea6e66ad5..d7ff7469919 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -2581,7 +2582,7 @@ namespace CGAL { /// @return the size (in number of darts) of the biggest cc. std::size_t keep_biggest_connected_component() { - std::map ccs; + std::unordered_map ccs; size_type treated=get_new_mark(); for (auto it=darts().begin(), itend=darts().end(); it!=itend; ++it) diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h index 70a3d4be17a..d5847071994 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -161,8 +161,8 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::map& myDarts) + std::unordered_map& myDarts) { // add dimension & type boost::property_tree::ptree& ndim = ptree.add("dimension", ""); @@ -194,8 +194,8 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::map& myDarts) + std::unordered_map& myDarts) { // add dimension & type boost::property_tree::ptree& ndim = ptree.add("dimension", ""); @@ -226,8 +226,8 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::map& myDarts) + std::unordered_map& myDarts) { // add dimension & type boost::property_tree::ptree& ndim = ptree.add("dimension", ""); @@ -259,8 +259,8 @@ namespace CGAL { struct My_functor_cmap_save_one_attrib { static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::map& myDarts) + std::unordered_map& myDarts) { // add dimension & type boost::property_tree::ptree& ndim = ptree.add("dimension", ""); @@ -288,8 +288,8 @@ namespace CGAL { { template static void run(CMap& amap, boost::property_tree::ptree& ptree, - std::map& myDarts) + std::unordered_map& myDarts) { My_functor_cmap_save_one_attrib::run(amap, ptree, myDarts); } @@ -297,12 +297,12 @@ namespace CGAL { template < class CMap > boost::property_tree::ptree cmap_save_darts - (CMap& amap, std::map& myDarts) + (CMap& amap, std::unordered_map& myDarts) { CGAL_assertion( myDarts.empty() ); - // First we numbered each dart by using the std::map. + // First we numbered each dart by using the unordered_map. typename CMap::Dart_range::const_iterator it(amap.darts().begin()); for(typename CMap::size_type num=1; num<=amap.number_of_darts(); ++num, ++it) @@ -341,8 +341,8 @@ namespace CGAL { template < class CMap > boost::property_tree::ptree cmap_save_attributes - (const CMap& amap, std::map& myDarts) + (const CMap& amap, std::unordered_map& myDarts) { using boost::property_tree::ptree; ptree pt; @@ -375,7 +375,7 @@ namespace CGAL { f(tree); // map dart => number - std::map myDarts; + std::unordered_map myDarts; // Save darts ptree pt_darts=cmap_save_darts(amap, myDarts); diff --git a/Generalized_map/include/CGAL/Generalized_map_save_load.h b/Generalized_map/include/CGAL/Generalized_map_save_load.h index 1b727e84493..bd9b2480756 100644 --- a/Generalized_map/include/CGAL/Generalized_map_save_load.h +++ b/Generalized_map/include/CGAL/Generalized_map_save_load.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include @@ -70,12 +70,12 @@ namespace CGAL { template < class GMap > boost::property_tree::ptree gmap_save_darts (const GMap& amap, - std::map& myDarts) { CGAL_assertion( myDarts.empty() ); - // First we numbered each dart by using the std::map. + // First we numbered each dart by using the unordered_map. typename GMap::Dart_range::const_iterator it(amap.darts().begin()); for(typename GMap::size_type num=1; num<=amap.number_of_darts(); ++num, ++it) @@ -119,7 +119,7 @@ namespace CGAL { ptree tree; // map dart => number - std::map myDarts; + std::unordered_map myDarts; // Save darts ptree pt_darts=gmap_save_darts(amap, myDarts);