MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / end_array

Method end_array

dependencies/json/json.hpp:5719–5745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5717 }
5718
5719 bool end_array()
5720 {
5721 bool keep = true;
5722
5723 if (ref_stack.back())
5724 {
5725 keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
5726 if (!keep)
5727 {
5728 // discard array
5729 *ref_stack.back() = discarded;
5730 }
5731 }
5732
5733 JSON_ASSERT(!ref_stack.empty());
5734 JSON_ASSERT(!keep_stack.empty());
5735 ref_stack.pop_back();
5736 keep_stack.pop_back();
5737
5738 // remove discarded value
5739 if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
5740 {
5741 ref_stack.back()->m_value.array->pop_back();
5742 }
5743
5744 return true;
5745 }
5746
5747 template<class Exception>
5748 bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
emptyMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected