Adds an empty Value to the current collection's item list and returns a pointer to it. Caller is responsible for initializing the Value.
| 199 | // Adds an empty Value to the current collection's item list and returns a pointer to it. |
| 200 | // Caller is responsible for initializing the Value. |
| 201 | uint8_t* Encoder::placeItem() { |
| 202 | throwIf(_blockedOnKey, EncodeError, "need a key before this value"); |
| 203 | if (_writingKey) { |
| 204 | _writingKey = false; |
| 205 | } else { |
| 206 | if (_items->tag == kDictTag) |
| 207 | _blockedOnKey = _writingKey = true; |
| 208 | } |
| 209 | |
| 210 | return (uint8_t*) _items->push_back_new(); |
| 211 | } |
| 212 | |
| 213 | // Writes blank space for a Value of the given size and returns a pointer to it. |
| 214 | template <bool canInline> |
nothing calls this directly
no outgoing calls
no test coverage detected