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

Function get_entity_id

library/modules/Persistence.cpp:254–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static bool get_entity_id(const std::string & fname, int & entity_id) {
255 if (!fname.starts_with("dfhack-entity-"))
256 return false;
257 entity_id = string_to_int(fname.substr(14, fname.length() - 18), -1);
258 return true;
259}
260
261static void add_entry(std::multimap<std::string, std::shared_ptr<Persistence::DataEntry>> & entity_store_entry,
262 std::shared_ptr<Persistence::DataEntry> entry) {

Callers 1

loadMethod · 0.85

Calls 2

string_to_intFunction · 0.85
lengthMethod · 0.80

Tested by

no test coverage detected