MCPcopy Create free account
hub / github.com/bblanchon/ArduinoJson / addPool

Method addPool

src/ArduinoJson/Memory/MemoryPoolList.hpp:170–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 }
169
170 Pool* addPool(Allocator* allocator) {
171 if (count_ == capacity_ && !increaseCapacity(allocator))
172 return nullptr;
173 auto pool = &pools_[count_++];
174 SlotCount poolCapacity = ARDUINOJSON_POOL_CAPACITY;
175 if (count_ == maxPools) // last pool is smaller because of NULL_SLOT
176 poolCapacity--;
177 pool->create(poolCapacity, allocator);
178 return pool;
179 }
180
181 bool increaseCapacity(Allocator* allocator) {
182 if (capacity_ == maxPools)

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected