The function I'm working on receives an enum object pointer which I'm trying to use in a switch case to check against the enum, but it's throwing the "Statement requires expression of integer type('id' invalid)" right at the switch statement." error, how can I handle this, I thought if there is a way I can get the object from the pointer and check
thanks in advance
inline PropType toPropType(ZPropType* propType){
switch(propType){ // error statement requires expression of integer type ZPropType
case ZPropType.FUEL:
return PropType.FUEL;
case ZPropType.ELECTRIC:
return PropType.ELECTRIC;
case ZPropType.WALK:
return PropType.WALK;
}
}