mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 18:27:37 +02:00
Remove VariantPool::capacity()
This commit is contained in:
@ -43,11 +43,6 @@ class ResourceManager {
|
||||
return allocator_;
|
||||
}
|
||||
|
||||
// Gets the capacity of the memoryPool in bytes
|
||||
size_t capacity() const {
|
||||
return VariantPool::slotsToBytes(variantPools_.capacity());
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return VariantPool::slotsToBytes(variantPools_.usage()) +
|
||||
stringPool_.size();
|
||||
|
@ -49,7 +49,6 @@ class VariantPool {
|
||||
VariantSlot* getSlot(SlotId id) const;
|
||||
void clear();
|
||||
void shrinkToFit(Allocator*);
|
||||
SlotCount capacity() const;
|
||||
SlotCount usage() const;
|
||||
|
||||
static SlotCount bytesToSlots(size_t);
|
||||
|
@ -49,10 +49,6 @@ inline SlotCount VariantPool::usage() const {
|
||||
return usage_;
|
||||
}
|
||||
|
||||
inline SlotCount VariantPool::capacity() const {
|
||||
return capacity_;
|
||||
}
|
||||
|
||||
inline void VariantPool::clear() {
|
||||
usage_ = 0;
|
||||
}
|
||||
|
@ -63,13 +63,6 @@ class VariantPoolList {
|
||||
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 total = 0;
|
||||
for (size_t i = 0; i < count_; i++)
|
||||
|
Reference in New Issue
Block a user