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

Function token_to_enum_val

plugins/stockpiles/StockpileSerializer.cpp:218–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 */
217template <typename E>
218static typename df::enum_traits<E>::base_type token_to_enum_val(const string& token) {
219 E val;
220 if (!find_enum_item(&val, token))
221 return -1;
222 return val;
223}
224
225static bool matches_filter(color_ostream& out, const vector<string>& filters, const string& name) {
226 for (auto & filter : filters) {

Callers

nothing calls this directly

Calls 1

find_enum_itemFunction · 0.85

Tested by

no test coverage detected