diff options
Diffstat (limited to 'src/support/small_vector.h')
-rw-r--r-- | src/support/small_vector.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/support/small_vector.h b/src/support/small_vector.h index 5791a0398..baf217086 100644 --- a/src/support/small_vector.h +++ b/src/support/small_vector.h @@ -111,6 +111,13 @@ public: flexible.clear(); } + void resize(size_t newSize) { + usedFixed = std::min(N, newSize); + if (newSize > N) { + flexible.resize(newSize - N); + } + } + bool operator==(const SmallVector<T, N>& other) const { if (usedFixed != other.usedFixed) { return false; |