Skip to content

Commit 72aa1a1

Browse files
committed
Add missing [] operator for cmap storage with index
1 parent 97be787 commit 72aa1a1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Combinatorial_map/include/CGAL/Combinatorial_map_storages_with_index.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ namespace CGAL {
144144
{ return idx; }
145145
size_type index(const_iterator cit) const
146146
{ return cit; }
147+
const Dart& operator[] (size_type i) const
148+
{ return mmap.mdarts[i]; }
149+
Dart& operator[] (size_type i)
150+
{ return mmap.mdarts[i]; }
147151
bool is_used(size_type i) const
148152
{ return mmap.mdarts.is_used(i); }
149153
bool owns(size_type i) const

Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages_with_index.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ namespace CGAL {
165165
{ return idx; }
166166
size_type index(const_iterator cit) const
167167
{ return cit; }
168+
const Dart& operator[] (size_type i) const
169+
{ return mmap.mdarts[i]; }
170+
Dart& operator[] (size_type i)
171+
{ return mmap.mdarts[i]; }
168172
bool is_used(size_type i) const
169173
{ return mmap.mdarts.is_used(i); }
170174
bool owns(size_type i) const

0 commit comments

Comments
 (0)