diff options
Diffstat (limited to 'source/core/list.h')
| -rw-r--r-- | source/core/list.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/list.h b/source/core/list.h index 5a94d8b83..68563f20c 100644 --- a/source/core/list.h +++ b/source/core/list.h @@ -420,6 +420,12 @@ namespace Slang { for (UInt i = 0; i < _count; i++) newBuffer[i] = static_cast<T&&>(buffer[i]); + + // Default-initialize the remaining elements + for(UInt i = _count; i < size; i++) + { + new(newBuffer + i) T(); + } } FreeBuffer(); } |
