22.03.2015, 15:09
Something like this maybe ?
I can't see a more "optimized" solution (except with packed strings, thing I can't use for the moment) (just proposing because I trynna go forward in the optimization)
I can't see a more "optimized" solution (except with packed strings, thing I can't use for the moment) (just proposing because I trynna go forward in the optimization)
PHP Code:
#define COUNTRY_US (0)
#define COUNTRY_CA (1)
#define COUNTRY_UK (2)
#define COUNTRY_FR (3)
#define COUNTRY_ES (4)
#define COUNTRY_DE (5)
#define COUNTRY_BE (6)
#define COUNTRY_NE (7)
#define COUNTRY_PT (8)
#define COUNTRY_OTHER (9)
stock const countryNames[][] = {
"United States", "Canada", "United Kingdom", "France", "Spain", "Germany", "Belgium", "Netherlands", "Portugal", "Other" };
#define GetCountryName(%1) (countryNames[%1])