Open GoogleCodeExporter opened 9 years ago
Actually yeah it won't compile without some changes I've missed, but the
significant stuff is all there.
As far as the type mappings go, just creating a type is a more optimal solution.
The code will simply compile to
SomeFunction(typeid >= 0 && typeid < Type::Unknown ? typeid : Type::Unknown);
As opposed to a map which does a lot more.
Original comment by AHeinerm
on 13 Mar 2012 at 1:51
However if you really want to check the validity of a type:
UnitType type(typeid);
if ( type != UnitTypes::Unknown )
SomeFunction(type);
Original comment by AHeinerm
on 13 Mar 2012 at 1:53
Original issue reported on code.google.com by
AHeinerm
on 13 Mar 2012 at 1:44Attachments: