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

Method describeEnum

library/RemoteTools.cpp:104–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void DFHack::describeEnum(RepeatedPtrField<EnumItemName> *pf, int base,
105 int size, const char* const *names)
106{
107 for (int i = 0; i < size; i++)
108 {
109 const char *key = names[i];
110 if (!key)
111 continue;
112
113 auto item = pf->Add();
114 item->set_value(base+i);
115 item->set_name(key);
116 }
117}
118
119void DFHack::describeBitfield(RepeatedPtrField<EnumItemName> *pf,
120 int size, const bitfield_item_info *items)

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45
set_nameMethod · 0.45

Tested by

no test coverage detected