Enums are basically just named constants. They don't really provide any if shortcuts. At least not in C++. If you arrange the constants nicely though, you can get some degree of shortcuts. But we're dealing with an already specified set of constants which we can't reorder, and they're not ordered nicely.
If you could reorder constants to keep releated ones consecutive, you can do something like:
if (weaponType >= mapLaser && weaponType <= mapAcidCloud)
{
// ....
}
Mind you, you might want to add secondary constants in a case like that, such as mapEdenFirstWeapon, mapEdenLastWeapon. It would make the if statement slightly clearer, and the needed additions to the enum would be fairly obvious in meaning.
enum map_id
{
// ...
mapEdenFirstWeapon,
mapLaser = mapEdenFirstWeapon,
// ...
mapAcidCloud,
mapEdenLastWeapon = mapAcidCloud,
// ...
};
I'm not sure if you can use the enum constants within the enum declaration though, so the values on the right of the = might need to be actual numbers.
But yeah, irrelevant.