diff --git a/spirv_cross_containers.hpp b/spirv_cross_containers.hpp index e79b3209..c496cb75 100644 --- a/spirv_cross_containers.hpp +++ b/spirv_cross_containers.hpp @@ -576,6 +576,7 @@ public: if (!ptr) return nullptr; + vacants.reserve(num_objects); for (unsigned i = 0; i < num_objects; i++) vacants.push_back(&ptr[i]);