diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
index 423f49aae1c..2e36037ea23 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
+++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
@@ -115,7 +115,7 @@ To answer this need, a combinatorial map allows to create attributes whic
an i-cell may have no associated i-attribute.
-Since i-cells are not explicitely represented in combinatorial maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a.
+Since i-cells are not explicitly represented in combinatorial maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a.
We can see two examples of combinatorial maps having some attributes in \cgalFigureRef{fig_cmap_with_attribs}. In the first example (Left), a 2D combinatorial map has 1-attributes containing a float, for example corresponding to the length of the associated 1-cell, and 2-attributes containing a color in RGB format. In the second example (Right), a 3D combinatorial map has 2-attributes containing a color in RGB format.
@@ -280,7 +280,7 @@ There are also two different classes of ranges containing one dart per i-
The iterators of the \link GenericMap::Dart_range `Dart_range`\endlink are bidirectional iterators, while the iterators of the other four ranges are forward iterators. The value type of all these iterators is `Dart` thus all these iterators can be directly used as \link GenericMap::Dart_descriptor `Dart_descriptor`\endlink.
-Additionally, there is a range over non void i-attributes: \link GenericMap::Attribute_range `Attribute_range::type`\endlink, having a bidirectional iterator with value type \link GenericMap::Attribute_type Attribute_type::type`\endlink.
+Additionally, there is a range over non void i-attributes: \link GenericMap::Attribute_range `Attribute_range::type`\endlink, having a bidirectional iterator with value type \link GenericMap::Attribute_type `Attribute_type::type`\endlink.
For each range, there is an associated const range, a model of the `ConstRange` concept. You can find some examples of ranges in Section \ref ssecexample3DCM "A 3D Combinatorial Map".
diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
index 007d8b424c5..03f492d1b08 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
+++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
@@ -4,7 +4,7 @@
The concept `CombinatorialMap` defines a d-dimensional combinatorial map.
-\cgalRefines `GenericMap`
+\cgalRefines{GenericMap}
\cgalHasModel \link CGAL::Combinatorial_map `CGAL::Combinatorial_map`\endlink
diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h
index 31bcaf161d6..790d378bd07 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h
+++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h
@@ -4,7 +4,7 @@
The concept `GenericMap` defines a d-dimensional generic map. This concept is defined only to factorize the common notions between \link CombinatorialMap `CombinatorialMap`\endlink and \link GeneralizedMap `GeneralizedMap`\endlink concepts.
-\cgalRefines DefaultConstructible
+\cgalRefines{DefaultConstructible}
A generic map has a set of darts D, and functions \f$ f_0\f$,\f$ \ldots\f$,\f$ f_{d}\f$ that link these darts between them.
@@ -450,28 +450,28 @@ template
const Attribute_type::type::Info& info_of_attribute(typename Attribute_const_descriptor::type ah) const;
/*!
-A shorcut for \link GenericMap::info_of_attribute `info_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`.
+A shortcut for \link GenericMap::info_of_attribute `info_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`.
\pre \link GenericMap::attribute `attribute`\endlink`(adart)!=nullptr`.
*/
template
typename Attribute_type::type::Info & info(Dart_descriptor adart);
/*!
-A shorcut for \link GenericMap::info_of_attribute(typename Attribute_const_descriptor::type)const `info_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor.
+A shortcut for \link GenericMap::info_of_attribute(typename Attribute_const_descriptor::type)const `info_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor.
\pre \link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart)!=nullptr`.
*/
template
const typename Attribute_type::type::Info & info(Dart_const_descriptor adart) const;
/*!
-A shorcut for \link GenericMap::dart_of_attribute `dart_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`.
+A shortcut for \link GenericMap::dart_of_attribute `dart_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`.
\pre `attribute(adart)!=nullptr`.
*/
template
Dart_descriptor & dart(Dart_descriptor adart);
/*!
-A shorcut for \link GenericMap::dart_of_attribute(typename Attribute_const_descriptor::type)const `dart_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor.
+A shortcut for \link GenericMap::dart_of_attribute(typename Attribute_const_descriptor::type)const `dart_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor.
\pre `attribute(adart)!=nullptr`.
*/
template
@@ -679,7 +679,7 @@ Returns the status of the management of the attributes of the generic map. (ca1.dart()).size();
CMap_3::size_type nb2=mmap.darts_of_cell<2>(ca2.dart()).size();
mmap.info<2>(ca1.dart())*=(double(nb1)/(nb1+nb2));
diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h
index 091fb5730a1..0c931f0e30d 100644
--- a/Combinatorial_map/include/CGAL/Cell_attribute.h
+++ b/Combinatorial_map/include/CGAL/Cell_attribute.h
@@ -176,11 +176,11 @@ struct Init_id;
{ return !operator==(other); }
protected:
- /// Contructor without parameter.
+ /// Constructor without parameter.
Cell_attribute_without_info(): mrefcounting(0), m_for_cc(Refs::null_descriptor)
{}
- /// Copy contructor.
+ /// Copy constructor.
Cell_attribute_without_info(const Cell_attribute_without_info& acell):
mrefcounting(acell.mrefcounting)
{}
@@ -301,12 +301,12 @@ struct Init_id;
{ return !operator==(other); }
protected:
- /// Contructor without parameter.
+ /// Constructor without parameter.
Cell_attribute_without_info() : mdart(Refs::null_descriptor),
mrefcounting(0)
{}
- /// Copy contructor.
+ /// Copy constructor.
Cell_attribute_without_info(const Cell_attribute_without_info& acell):
mdart(acell.mdart),
mrefcounting(acell.mrefcounting)
@@ -398,7 +398,7 @@ struct Init_id;
typedef void Info;
protected:
- /// Default contructor.
+ /// Default constructor.
Cell_attribute()
{}
};
@@ -461,11 +461,11 @@ struct Init_id;
{ return !operator==(other); }
protected:
- /// Default contructor.
+ /// Default constructor.
Cell_attribute()
{}
- /// Contructor with an info in parameter.
+ /// Constructor with an info in parameter.
Cell_attribute(const Info_& ainfo) :
Info_for_cell_attribute(ainfo)
{}
diff --git a/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h b/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h
index 768e0b82aeb..7366d118928 100644
--- a/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h
+++ b/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h
@@ -42,11 +42,11 @@ namespace CGAL {
friend class Concurrent_compact_container;
protected:
- /// Default contructor.
+ /// Default constructor.
Cell_attribute_with_id()
{}
- /// Contructor with an info in parameter.
+ /// Constructor with an info in parameter.
Cell_attribute_with_id(const Info_& ainfo) :
Cell_attribute(ainfo)
{}
@@ -64,7 +64,7 @@ namespace CGAL {
friend class Concurrent_compact_container;
protected:
- /// Default contructor.
+ /// Default constructor.
Cell_attribute_with_id()
{}
};
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h
index 77af5bbc736..ee80b2978c2 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h
@@ -219,7 +219,7 @@ namespace CGAL {
* @param dartinfoconverter functor to transform original information of darts into information of copies
* @param pointconverter functor to transform points in original map into points of copies.
* @param copy_perforated_darts true to copy also darts marked perforated (if any)
- * @param mark_perforated_darts true to mark darts wich are copies of perforated darts (if any)
+ * @param mark_perforated_darts true to mark darts which are copies of perforated darts (if any)
* @post *this is valid.
*/
template ::value>
(mattribute_containers).emplace(args...);
// Reinitialize the ref counting of the new attribute. This is normally
- // not required except if create_attribute is used as "copy contructor".
+ // not required except if create_attribute is used as "copy constructor".
this->template init_attribute_ref_counting(res);
internal::Init_id::type>::run
(this->template attributes(), res);
@@ -1639,8 +1639,8 @@ namespace CGAL {
CGAL_static_assertion(i<=dimension);
CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0,
"set_attribute but i-attributes are disabled");
-
- for (typename Dart_of_cell_range::iterator it(*this, dh); it.cont(); ++it)
+ for (typename Dart_of_cell_range::iterator it(*this, dh);
+ it.cont(); ++it)
{
this->template set_dart_attribute(it, ah);
}
@@ -3543,7 +3543,7 @@ namespace CGAL {
::run(*this, map2, current, other);
}
- // We test if the injection is valid with its neighboors.
+ // We test if the injection is valid with its neighbors.
// We go out as soon as it is not satisfied.
for (i=0; match && i<=dimension; ++i)
{
@@ -3772,7 +3772,7 @@ namespace CGAL {
/** Test if a face is a combinatorial polygon of length alg
* (a cycle of alg darts beta1 links together).
- * @param adart an intial dart
+ * @param adart an initial dart
* @return true iff the face containing adart is a polygon of length alg.
*/
bool is_face_combinatorial_polygon(Dart_const_descriptor adart,
@@ -3858,7 +3858,7 @@ namespace CGAL {
}
/** Test if a volume is a combinatorial tetrahedron.
- * @param adart an intial dart
+ * @param adart an initial dart
* @return true iff the volume containing adart is a combinatorial tetrahedron.
*/
bool is_volume_combinatorial_tetrahedron(Dart_const_descriptor d1) const
@@ -3951,7 +3951,7 @@ namespace CGAL {
}
/** Test if a volume is a combinatorial hexahedron.
- * @param adart an intial dart
+ * @param adart an initial dart
* @return true iff the volume containing adart is a combinatorial hexahedron.
*/
bool is_volume_combinatorial_hexahedron(Dart_const_descriptor d1) const
@@ -4145,7 +4145,7 @@ namespace CGAL {
}
/** Insert a vertex in the given 2-cell which is split in triangles,
- * once for each inital edge of the facet.
+ * once for each initial edge of the facet.
* @param adart a dart of the facet to triangulate.
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h
index d3d11cbdfc7..5cbf7b7861a 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h
@@ -41,7 +41,7 @@ namespace internal
// ****************************************************************************
// Map1 is the existing map, to convert into map2.
// Functor called only when both i-attributes have non void info.
-// General cases when both info are differents.
+// General cases when both info are different.
template< typename Map1, typename Map2, unsigned int i,
typename Info1=typename Map1::template
Attribute_type::type::Info,
@@ -439,7 +439,7 @@ struct Default_converter_cmap_attributes
};
// ****************************************************************************
// Cast converter always copy attributes, doing a cast. This can work only
-// if both types are convertible and this is user responsability
+// if both types are convertible and this is user responsibility
// to use it only in this case.
template< typename Map1, typename Map2, unsigned int i>
struct Cast_converter_cmap_attributes
@@ -480,7 +480,7 @@ struct Default_converter_dart_info
};
// ****************************************************************************
// Cast converter of dart info. This can work only if both types are
-// convertible and this is user responsability to use it only in this case.
+// convertible and this is user responsibility to use it only in this case.
template< typename Map1, typename Map2>
struct Cast_converter_dart_info
{
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h
index 6fd93934b2c..d86c152c503 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h
@@ -33,7 +33,7 @@
* Group_attribute_functor to group the -attributes of two
* given i-cells (except for j-adim). If one i-attribute is nullptr, we set the
* darts of its i-cell to the second attribute. If both i-attributes are
- * non nullptr, we overide all the i-attribute of the second i-cell to the
+ * non nullptr, we override all the i-attribute of the second i-cell to the
* first i-attribute.
*
* Group_neighboor_attribute to group the -attributes of beta_i(d1) and
@@ -609,6 +609,15 @@ void test_split_attribute_functor_one_dart
Attribute_descriptor_i a1 = amap.template attribute(adart);
if ( found_attributes.is_defined(a1) )
{ // Here the attribute was already present in the hash_map
+
+ // We need to call reserve for the cc with index case. Indeed, if the vector
+ // is reallocated, the reference returned by get_attribute(a1) will be
+ // invalidated, and the copy will be wrong. Note that there is no overhead
+ // since the creation of the attribute need one allocation.
+ amap.template attributes().reserve(amap.template attributes().size()+1);
+
+ // Now we are sure that the creation of a new attribute will not imply
+ // a realloc.
Attribute_descriptor_i a2 = amap.template
create_attribute(amap.template get_attribute(a1));
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h
index 5fe14f3217b..3e0b147942c 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h
@@ -39,7 +39,7 @@
* valid (all its darts are linked to the same attribute, no other dart is
* linked with this attribute).
*
- * internal::Count_cell_functor to count the nuber of i-cells.
+ * internal::Count_cell_functor to count the number of i-cells.
*
* internal::Count_bytes_one_attribute_functor to count the memory
* occupied by i-attributes.
@@ -66,7 +66,7 @@
* internal::Test_is_same_attribute_functor to test if two
* i-attributes of two darts are isomorphic (ie they have the same info).
*
- * inernal::Test_is_same_attribute_point_functor to test if
+ * internal::Test_is_same_attribute_point_functor to test if
* the point of two i-attributes are equal.
*
* internal::Reverse_orientation_of_map_functor to reverse the
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h
index 884c4f80b98..4488da87fe1 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h
@@ -533,7 +533,7 @@ namespace CGAL
struct Attribute_type
{ typedef Void type; };
- // Helper class allowing to retreive the d-cell-descriptor attribute
+ // Helper class allowing to retrieve the d-cell-descriptor attribute
template::type,
typename WithIndex=typename CMap::Use_index>
struct Attribute_descriptor
@@ -550,7 +550,7 @@ namespace CGAL
struct Attribute_descriptor
{ typedef typename CMap::Dart_index type; };
- // Helper class allowing to retreive the d-cell-const descriptor attribute
+ // Helper class allowing to retrieve the d-cell-const descriptor attribute
template::type>
struct Attribute_const_descriptor
{
@@ -562,7 +562,7 @@ namespace CGAL
struct Attribute_const_descriptor
{ typedef CGAL::Void* type; };
- // Helper class allowing to retreive the d-cell-iterator attribute
+ // Helper class allowing to retrieve the d-cell-iterator attribute
template::type>
struct Attribute_iterator
{
@@ -574,7 +574,7 @@ namespace CGAL
struct Attribute_iterator
{ typedef CGAL::Void* type; };
- // Helper class allowing to retreive the d-cell-const descriptor attribute
+ // Helper class allowing to retrieve the d-cell-const descriptor attribute
template::type>
struct Attribute_const_iterator
{
@@ -586,7 +586,7 @@ namespace CGAL
struct Attribute_const_iterator
{ typedef CGAL::Void* type; };
- // Helper class allowing to retreive the d-cell-attribute range
+ // Helper class allowing to retrieve the d-cell-attribute range
template::type>
struct Attribute_range
{
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h
index eeb2c40b146..0b2c39bc720 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h
@@ -28,7 +28,7 @@ namespace CGAL {
* Basic classes that serve as tools for definition of iterators.
There are 3 classes:
* - CMap_dart_iterator