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

Function is_valid_enum_item

library/include/DataDefs.h:783–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781 */
782 template<typename T>
783 inline bool is_valid_enum_item(T v)
784 {
785 if constexpr (complex_enum<T>)
786 {
787 const auto& complex = df::enum_traits<T>::complex;
788 return complex.value_index_map.find(v) != complex.value_index_map.end();
789 }
790 else
791 {
792 return df::enum_traits<T>::is_valid(v);
793 }
794 }
795
796
797 /**

Callers 15

findSimilarTileTypeFunction · 0.85
makeAnnouncementMethod · 0.85
addCombatReportMethod · 0.85
showAutoAnnouncementMethod · 0.85
autoDFAnnouncementMethod · 0.85
moveToInventoryMethod · 0.85
isValidLaborMethod · 0.85
setLaborValidityMethod · 0.85
place_veinsMethod · 0.85
processTileTypeFunction · 0.85

Calls 3

is_validFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected