sparse_set: make shrink_to_fit virtual

This commit is contained in:
Michele Caini
2021-07-18 23:37:17 +02:00
parent 75d4bc7c18
commit 6a2c54adf5
2 changed files with 2 additions and 2 deletions

View File

@@ -410,7 +410,7 @@ public:
}
/*! @brief Requests the removal of unused capacity. */
void shrink_to_fit() {
virtual void shrink_to_fit() {
if(count < reserved.second()) {
resize_packed(count);
}

View File

@@ -420,7 +420,7 @@ public:
}
/*! @brief Requests the removal of unused capacity. */
void shrink_to_fit() {
void shrink_to_fit() override {
underlying_type::shrink_to_fit();
release_unused_pages();
}