MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / readMapContainer

Method readMapContainer

source/core/StarDataStream.hpp:353–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351
352template <typename Container, typename ReadFunction>
353void DataStream::readMapContainer(Container& map, ReadFunction function) {
354 map.clear();
355 size_t size = readVlqU();
356 for (size_t i = 0; i < size; ++i) {
357 typename Container::key_type key;
358 typename Container::mapped_type mapped;
359 function(*this, key, mapped);
360 map.insert(make_pair(std::move(key), std::move(mapped)));
361 }
362}
363
364template <typename Container>
365void DataStream::writeContainer(Container const& container) {

Callers 8

StarTileDamage.cppFile · 0.80
readMethod · 0.80
readNpcVariantMethod · 0.80
StarJson.cppFile · 0.80
StarIdMap.hppFile · 0.80

Calls 3

readVlqUFunction · 0.85
clearMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected