MCPcopy Create free account
hub / github.com/DFHack/dfhack / serialize_noble_map

Function serialize_noble_map

plugins/preserve-rooms.cpp:192–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192static string serialize_noble_map(const unordered_map<int32_t, vector<string>> & data) {
193 vector<string> elems;
194 for (auto &[key, vec] : data)
195 elems.push_back(int_to_string(key) + "/" + join_strings("/", vec));
196 return join_strings(",", elems);
197}
198
199static void store_noble_map(const unordered_map<int32_t, vector<string>> & data, const char * suffix) {
200 get_config(suffix, true).set_str(serialize_noble_map(data));

Callers 2

store_noble_mapFunction · 0.85

Calls 2

int_to_stringFunction · 0.85
join_stringsFunction · 0.50

Tested by

no test coverage detected