mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-30 02:37:35 +02:00
Remove VariantPool::capacity()
This commit is contained in:
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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++)
|
||||||
|
Reference in New Issue
Block a user