| 185 | delete _root; |
| 186 | } |
| 187 | JNode* get_root() { |
| 188 | assert(_nodes.size() == 1); |
| 189 | assert(_nodes.front().size() == 1); |
| 190 | _root->set_children(std::move(_nodes.front().front()._children)); |
| 191 | DEFER(_root = nullptr); |
| 192 | return _root; |
| 193 | } |
| 194 | void emplace_back(const char* s, size_t length, uint8_t type) { |
| 195 | str val{s, length}; // _key may be empty() |
| 196 | _nodes.back().emplace_back(_key, val, _root); |
no test coverage detected