| 846 | */ |
| 847 | template<class T> |
| 848 | inline bool find_enum_item(T *var, const std::string &name) { |
| 849 | using traits = df::enum_traits<T>; |
| 850 | int size = traits::last_item_value-traits::first_item_value+1; |
| 851 | int idx = findEnumItem(name, size, traits::key_table); |
| 852 | if (idx < 0) return false; |
| 853 | *var = T(traits::first_item_value+idx); |
| 854 | return true; |
| 855 | } |
| 856 | |
| 857 | /* |
| 858 | * Bitfield tools. |
no outgoing calls
no test coverage detected