summaryrefslogtreecommitdiff
path: root/modules/core/c++
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/c++')
-rw-r--r--modules/core/c++/id_map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/core/c++/id_map.h b/modules/core/c++/id_map.h
index d8329cf..9ad2847 100644
--- a/modules/core/c++/id_map.h
+++ b/modules/core/c++/id_map.h
@@ -32,10 +32,16 @@ private:
*/
void reduce_free_ids() noexcept {
for(;;){
+ /**
+ * If we have no free ids left, we also have nothing to reduce
+ */
if(free_ids_.empty()){
break;
}
+ /**
+ * The front contains the highest free id.
+ */
if((free_ids_.front().get_value() + 1) < data_.size()){
break;
}