flaing / jnibwapi

Automatically exported from code.google.com/p/jnibwapi
0 stars 0 forks source link

Patch for BWAPI4. #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is a patch that cleans up the Client cpp file and makes it compatible with 
BWAPI4. This was not tested nor compiled.

Original issue reported on code.google.com by AHeinerm on 13 Mar 2012 at 1:44

Attachments:

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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