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

Method clone

library/DataDefs.cpp:420–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420virtual_ptr virtual_identity::clone(virtual_ptr obj)
421{
422 const virtual_identity *id = get(obj);
423 if (!id) return nullptr;
424 virtual_ptr copy = id->instantiate();
425 if (!copy) return nullptr;
426 id->do_copy(copy, obj);
427 return copy;
428}
429
430bool DFHack::findBitfieldField(unsigned *idx, const std::string &name,
431 unsigned size, const bitfield_item_info *items)

Callers 1

cloneJobStructMethod · 0.80

Calls 1

getFunction · 0.50

Tested by

no test coverage detected