BREW: Notes on Brew

Apparently Visual Studios .NET 2005 does not like it when you pass in an enumeration as a parameter.

warning C4482: nonstandard extension used: enum 'MIDlet::CRITICAL_GAME_STATE' used in qualified name

The offending code would look something like this:

enum GAME_STATE
{
STATE_ON,
STATE_OFF,
};

void func(GAME_STATE gs);
void class::func(GAME_STATE gs) { }

Instead it would be wiser to manually convert the code into int, like so:

public:
const static int STATE_ON=0;
const static int STATE_OFF=1;

void func(int gs);
void class::func(int gs) { }

No comments: