MCPcopy Create free account
hub / github.com/apache/trafficserver / convert_sequence_to_map

Method convert_sequence_to_map

lib/yamlcpp/src/node_data.cpp:307–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307void node_data::convert_sequence_to_map(const shared_memory_holder& pMemory) {
308 assert(m_type == NodeType::Sequence);
309
310 reset_map();
311 for (std::size_t i = 0; i < m_sequence.size(); i++) {
312 std::stringstream stream;
313 stream << i;
314
315 node& key = pMemory->create_node();
316 key.set_scalar(stream.str());
317 insert_map_pair(key, *m_sequence[i]);
318 }
319
320 reset_sequence();
321 m_type = NodeType::Map;
322}
323} // namespace detail
324} // namespace YAML

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
set_scalarMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected