@@ -17,7 +17,7 @@ struct tape_builder {
17
17
return iter.walk_document <STREAMING>(builder);
18
18
}
19
19
20
- simdjson_really_inline error_code root_primitive (json_iterator &iter, const uint8_t *value) {
20
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code root_primitive (json_iterator &iter, const uint8_t *value) {
21
21
switch (*value) {
22
22
case ' "' : return parse_string (iter, value);
23
23
case ' t' : return parse_root_true_atom (iter, value);
@@ -32,7 +32,7 @@ struct tape_builder {
32
32
return TAPE_ERROR;
33
33
}
34
34
}
35
- simdjson_really_inline error_code primitive (json_iterator &iter, const uint8_t *value) {
35
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code primitive (json_iterator &iter, const uint8_t *value) {
36
36
switch (*value) {
37
37
case ' "' : return parse_string (iter, value);
38
38
case ' t' : return parse_true_atom (iter, value);
@@ -47,13 +47,13 @@ struct tape_builder {
47
47
return TAPE_ERROR;
48
48
}
49
49
}
50
- simdjson_really_inline void empty_object (json_iterator &iter) {
50
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code empty_object (json_iterator &iter) {
51
51
iter.log_value (" empty object" );
52
- empty_container (iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
52
+ return empty_container (iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT);
53
53
}
54
- simdjson_really_inline void empty_array (json_iterator &iter) {
54
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code empty_array (json_iterator &iter) {
55
55
iter.log_value (" empty array" );
56
- empty_container (iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
56
+ return empty_container (iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY);
57
57
}
58
58
59
59
SIMDJSON_WARN_UNUSED simdjson_really_inline error_code start_document (json_iterator &iter) {
@@ -95,8 +95,9 @@ struct tape_builder {
95
95
}
96
96
97
97
// increment_count increments the count of keys in an object or values in an array.
98
- simdjson_really_inline void increment_count (json_iterator &iter) {
98
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code increment_count (json_iterator &iter) {
99
99
iter.dom_parser .open_containers [iter.depth ].count ++; // we have a key value pair in the object at parser.dom_parser.depth - 1
100
+ return SUCCESS;
100
101
}
101
102
simdjson_really_inline bool in_array (json_iterator &iter) noexcept {
102
103
return iter.dom_parser .is_array [iter.depth ];
@@ -128,7 +129,7 @@ struct tape_builder {
128
129
return SUCCESS;
129
130
}
130
131
131
- simdjson_really_inline error_code parse_root_number (json_iterator &iter, const uint8_t *value) {
132
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code parse_root_number (json_iterator &iter, const uint8_t *value) {
132
133
//
133
134
// We need to make a copy to make sure that the string is space terminated.
134
135
// This is not about padding the input, which should already padded up
@@ -201,10 +202,11 @@ struct tape_builder {
201
202
return uint32_t (tape.next_tape_loc - iter.dom_parser .doc ->tape .get ());
202
203
}
203
204
204
- simdjson_really_inline void empty_container (json_iterator &iter, internal::tape_type start, internal::tape_type end) {
205
+ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code empty_container (json_iterator &iter, internal::tape_type start, internal::tape_type end) {
205
206
auto start_index = next_tape_index (iter);
206
207
tape.append (start_index+2 , start);
207
208
tape.append (start_index, end);
209
+ return SUCCESS;
208
210
}
209
211
210
212
simdjson_really_inline void start_container (json_iterator &iter) {
0 commit comments