| 249 | } |
| 250 | |
| 251 | sonic_force_inline bool EndObject(size_t pairs) { |
| 252 | NodeType &obj = *stack_.template Begin<NodeType>(); |
| 253 | obj.setLength(pairs, kObject); |
| 254 | if (pairs) { |
| 255 | void *mem = obj.template containerMalloc<MemberType>(pairs, *alloc_); |
| 256 | obj.setChildren(mem); |
| 257 | internal::Xmemcpy<sizeof(MemberType)>( |
| 258 | (void *)obj.getObjChildrenFirstUnsafe(), (void *)(&obj + 1), pairs); |
| 259 | stack_.Pop<MemberType>(pairs); |
| 260 | } else { |
| 261 | obj.setChildren(nullptr); |
| 262 | } |
| 263 | return true; |
| 264 | } |
| 265 | |
| 266 | sonic_force_inline bool Key(const char *data, size_t len, size_t allocated) { |
| 267 | new (stack_.PushSize<NodeType>(1)) NodeType(); |
nothing calls this directly
no test coverage detected