1 | #include "simdjson/arm64/begin.h" |
---|---|
2 | |
3 | namespace simdjson { |
4 | namespace SIMDJSON_IMPLEMENTATION { |
5 | |
6 | simdjson_warn_unused error_code implementation::create_dom_parser_implementation( |
7 | size_t capacity, |
8 | size_t max_depth, |
9 | std::unique_ptr<internal::dom_parser_implementation>& dst |
10 | ) const noexcept { |
11 | dst.reset( p: new (std::nothrow) dom_parser_implementation() ); |
12 | if (!dst) { return MEMALLOC; } |
13 | if (auto err = dst->set_capacity(capacity)) |
14 | return err; |
15 | if (auto err = dst->set_max_depth(max_depth)) |
16 | return err; |
17 | return SUCCESS; |
18 | } |
19 | |
20 | } // namespace SIMDJSON_IMPLEMENTATION |
21 | } // namespace simdjson |
22 | |
23 | #include "simdjson/arm64/end.h" |
24 |