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

Method isValid

library/modules/Persistence.cpp:150–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150bool PersistentDataItem::isValid() const
151{
152 if (data == nullptr)
153 return false;
154
155 CoreSuspender suspend;
156
157 return entry_cache.contains(data->entry_id) && entry_cache.at(data->entry_id) == data;
158}
159
160int PersistentDataItem::fake_df_id() {
161 if (!isValid())

Callers 1

deleteItemMethod · 0.45

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected