From d6eea41e13b8df042af7d0f8bfc2c19f9bb22b4a Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 18 Jul 2021 23:39:07 +0200 Subject: [PATCH] sparse_set: make reserve virtual --- src/entt/entity/sparse_set.hpp | 2 +- src/entt/entity/storage.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index cb7e71567..a4f7e8ac6 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -394,7 +394,7 @@ public: * * @param cap Desired capacity. */ - void reserve(const size_type cap) { + virtual void reserve(const size_type cap) { if(cap > reserved.second()) { resize_packed(cap); } diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index a4310f731..28d878823 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -402,7 +402,7 @@ public: * * @param cap Desired capacity. */ - void reserve(const size_type cap) { + void reserve(const size_type cap) override { underlying_type::reserve(cap); if(cap > underlying_type::size()) {