MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / operator->

Method operator->

native/thirdpart/json/json.hpp:9583–9611  ·  view source on GitHub ↗

! @brief dereference the iterator @pre The iterator is initialized; i.e. `m_object != nullptr`. */

Source from the content-addressed store, hash-verified

9581 @pre The iterator is initialized; i.e. `m_object != nullptr`.
9582 */
9583 pointer operator->() const
9584 {
9585 assert(m_object != nullptr);
9586
9587 switch (m_object->m_type)
9588 {
9589 case value_t::object:
9590 {
9591 assert(m_it.object_iterator != m_object->m_value.object->end());
9592 return &(m_it.object_iterator->second);
9593 }
9594
9595 case value_t::array:
9596 {
9597 assert(m_it.array_iterator != m_object->m_value.array->end());
9598 return &*m_it.array_iterator;
9599 }
9600
9601 default:
9602 {
9603 if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
9604 {
9605 return m_object;
9606 }
9607
9608 JSON_THROW(invalid_iterator::create(214, "cannot get value"));
9609 }
9610 }
9611 }
9612
9613 /*!
9614 @brief post-increment (it++)

Callers

nothing calls this directly

Calls 3

createFunction · 0.85
is_beginMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected