Remove VariantPool::capacity()

This commit is contained in:
Benoit Blanchon
2023-07-17 21:08:49 +02:00
parent 0f319e7ca4
commit 0f3c73a211
4 changed files with 0 additions and 17 deletions

View File

@ -43,11 +43,6 @@ class ResourceManager {
return allocator_; return allocator_;
} }
// Gets the capacity of the memoryPool in bytes
size_t capacity() const {
return VariantPool::slotsToBytes(variantPools_.capacity());
}
size_t size() const { size_t size() const {
return VariantPool::slotsToBytes(variantPools_.usage()) + return VariantPool::slotsToBytes(variantPools_.usage()) +
stringPool_.size(); stringPool_.size();

View File

@ -49,7 +49,6 @@ class VariantPool {
VariantSlot* getSlot(SlotId id) const; VariantSlot* getSlot(SlotId id) const;
void clear(); void clear();
void shrinkToFit(Allocator*); void shrinkToFit(Allocator*);
SlotCount capacity() const;
SlotCount usage() const; SlotCount usage() const;
static SlotCount bytesToSlots(size_t); static SlotCount bytesToSlots(size_t);

View File

@ -49,10 +49,6 @@ inline SlotCount VariantPool::usage() const {
return usage_; return usage_;
} }
inline SlotCount VariantPool::capacity() const {
return capacity_;
}
inline void VariantPool::clear() { inline void VariantPool::clear() {
usage_ = 0; usage_ = 0;
} }

View File

@ -63,13 +63,6 @@ class VariantPoolList {
capacity_ = 0; capacity_ = 0;
} }
SlotCount capacity() const {
SlotCount total = 0;
for (size_t i = 0; i < count_; i++)
total = SlotCount(total + pools_[i].capacity());
return total;
}
SlotCount usage() const { SlotCount usage() const {
SlotCount total = 0; SlotCount total = 0;
for (size_t i = 0; i < count_; i++) for (size_t i = 0; i < count_; i++)