MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / start_array

Method start_array

include/nlohmann/json.hpp:8936–8955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8934 }
8935
8936 bool start_array(std::size_t len)
8937 {
8938 ref_stack.push_back(handle_value(BasicJsonType::value_t::array));
8939
8940#if JSON_DIAGNOSTIC_POSITIONS
8941 // Manually set the start position of the array here.
8942 // Ensure this is after the call to handle_value to ensure correct start position.
8943 if (m_lexer_ref)
8944 {
8945 ref_stack.back()->start_position = m_lexer_ref->get_position() - 1;
8946 }
8947#endif
8948
8949 if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size()))
8950 {
8951 JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
8952 }
8953
8954 return true;
8955 }
8956
8957 bool end_array()
8958 {

Callers

nothing calls this directly

Calls 6

unknown_sizeFunction · 0.85
createFunction · 0.85
max_sizeMethod · 0.80
concatFunction · 0.70
to_stringFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected