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

Function serialize_zone_assignments

plugins/preserve-rooms.cpp:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127static string serialize_zone_assignments(const ZoneAssignments & data) {
128 vector<string> elems;
129 for (auto elem : data) {
130 vector<int32_t> ints = {elem.first, elem.second.first, elem.second.second};
131 elems.push_back(join_strings("/", ints));
132 }
133 return join_strings(",", elems);
134}
135
136static void store_zone_assignments(const ZoneAssignments & data, const char * suffix) {
137 get_config(suffix, true).set_str(serialize_zone_assignments(data));

Callers 2

store_zone_assignmentsFunction · 0.85

Calls 1

join_stringsFunction · 0.50

Tested by

no test coverage detected