summaryrefslogtreecommitdiff
path: root/src/mixed_arena.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixed_arena.h')
-rw-r--r--src/mixed_arena.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mixed_arena.h b/src/mixed_arena.h
index a36f72a8d..4d8cda0ac 100644
--- a/src/mixed_arena.h
+++ b/src/mixed_arena.h
@@ -253,8 +253,9 @@ public:
if (allocatedElements < size) {
static_cast<SubType*>(this)->allocate(size);
}
- for (size_t i = 0; i < size; i++) {
- data[i] = list[i];
+ size_t i = 0;
+ for (auto elem : list) {
+ data[i++] = elem;
}
usedElements = size;
}