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

Method allocSlot

src/ArduinoJson/Memory/MemoryPool.hpp:65–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64
65 Slot<T> allocSlot() {
66 if (!slots_)
67 return {};
68 if (usage_ >= capacity_)
69 return {};
70 auto index = usage_++;
71 return {slots_ + index, SlotId(index)};
72 }
73
74 T* getSlot(SlotId id) const {
75 ARDUINOJSON_ASSERT(id < usage_);

Callers 2

allocVariantMethod · 0.45
allocExtensionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected