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

Method writeUniqueIndexStore

source/game/StarWorldStorage.cpp:557–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557ByteArray WorldStorage::writeUniqueIndexStore(UniqueIndexStore const& store) {
558 return compressData(DataStreamBuffer::serializeMapContainer(store,
559 [](DataStream& ds, String const& key, SectorAndPosition const& value) {
560 ds.write(key);
561 ds.cwrite<uint16_t>(value.first[0]);
562 ds.cwrite<uint16_t>(value.first[1]);
563 ds.write(value.second);
564 }));
565}
566
567ByteArray WorldStorage::sectorUniqueKey(Sector const& sector) {
568 DataStreamBuffer ds(5);

Callers

nothing calls this directly

Calls 2

compressDataFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected