summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 16:08:25 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 16:08:25 +0100
commitd23fbdbe85404da8f8e0f3697852e83cc2192c38 (patch)
tree7ce39ccadf7568bb349c9af515c42c147fa99bb4 /lib
parentExtend glContainer with most of the interface expected of an STL container (diff)
downloadilt-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.h1
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_);