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

Function set_flagarray_field

library/include/DataDefs.h:942–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940 */
941 template<class T>
942 inline bool set_flagarray_field(BitArray<T> *bitfield, const std::string &name, int value)
943 {
944 T tmp;
945 if (!find_enum_item(&tmp, name) || tmp < 0) return false;
946 bitfield->set(tmp, value!=0);
947 return true;
948 }
949
950 /**
951 * Find a flag array item by key and retrieve its value. Returns success code.

Callers

nothing calls this directly

Calls 2

find_enum_itemFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected