diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-01 16:08:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-01 16:08:25 +0100 |
commit | d23fbdbe85404da8f8e0f3697852e83cc2192c38 (patch) | |
tree | 7ce39ccadf7568bb349c9af515c42c147fa99bb4 /lib | |
parent | Extend glContainer with most of the interface expected of an STL container (diff) | |
download | ilt-d23fbdbe85404da8f8e0f3697852e83cc2192c38.tar.bz2 ilt-d23fbdbe85404da8f8e0f3697852e83cc2192c38.tar.xz ilt-d23fbdbe85404da8f8e0f3697852e83cc2192c38.zip |
glContainer should at least double in capacity as required
Diffstat (limited to 'lib')
-rw-r--r-- | lib/glContainer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/glContainer.h b/lib/glContainer.h index 3dff6b1..4b85005 100644 --- a/lib/glContainer.h +++ b/lib/glContainer.h @@ -315,6 +315,7 @@ public: if (newCapacity <= capacity_) { return; } + newCapacity = std::max(newCapacity, capacity_ * 2); std::vector<T> existing; existing.reserve(size_); |