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

Function is_good_entity_id

library/modules/Persistence.cpp:335–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335static bool is_good_entity_id(int entity_id) {
336 return entity_id == Persistence::WORLD_ENTITY_ID || entity_id >= 0;
337}
338
339PersistentDataItem Persistence::addItem(int entity_id, const std::string &key) {
340 if (!is_good_entity_id(entity_id) || key.empty() || !Core::getInstance().isWorldLoaded())

Callers 5

addItemMethod · 0.85
getByKeyMethod · 0.85
getAllMethod · 0.85
getAllByKeyRangeMethod · 0.85
getAllByKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected