| 169 | template <typename EnumType, |
| 170 | typename EnumTypeRaw = typename std::underlying_type<EnumType>::type> |
| 171 | inline static EnumTypeRaw LoadEnumRaw(const EnumType* in) { |
| 172 | EnumTypeRaw raw_value; |
| 173 | // Use memcpy(), as a regular cast would be undefined behaviour on invalid values |
| 174 | memcpy(&raw_value, in, sizeof(EnumType)); |
| 175 | return raw_value; |
| 176 | } |
| 177 | |
| 178 | template <typename ApiType> |
| 179 | struct SafeLoader { |
no outgoing calls
no test coverage detected