diff --git a/Property_map/include/CGAL/Dynamic_property_map.h b/Property_map/include/CGAL/Dynamic_property_map.h index fd45e0a3a22..ce2106c60a1 100644 --- a/Property_map/include/CGAL/Dynamic_property_map.h +++ b/Property_map/include/CGAL/Dynamic_property_map.h @@ -49,22 +49,20 @@ struct Dynamic_property_map { } } - - friend reference get(const Dynamic_property_map& m, const key_type& k) + friend value_type get(const Dynamic_property_map& m, const key_type& k) { typename Map::const_iterator it = m.map_->find(k); if(it == m.map_->end()){ + (*(const_cast(m).map_))[k] = m.default_value(); return m.default_value(); } return it->second; } - friend void put(Dynamic_property_map& m, const key_type& k, const value_type& v) + friend void put(const Dynamic_property_map& m, const key_type& k, const value_type& v) { - if(v != m.default_value()){ - (*(m.map_))[k] = v; - } + (*(m.map_))[k] = v; } @@ -191,7 +189,7 @@ add_property(face_property_t prop, const G&) return internal::Dynamic_property_map(prop.t); } -template +template void remove_property( internal::Dynamic_property_map pm, const G&)