sparse_set: make shrink_to_fit virtual
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user