Classes, types & inlines

Classes, types & inlines

Postby TBeholder » Mon Jul 15, 2013 8:11 pm

Is there a reason not to take enum types out of weapon_info? Do we really need "weapon_info:HEAVY" stuff all over, maybe MOUNT_HEAVY would be enough? I tried to make a constant, something like
Code: Select all
const MOUNT_SIZE MountSizeMaskMissile =(weapon_info::LIGHTMISSILE
                                        | weapon_info::MEDIUMMISSILE
                                        | weapon_info::HEAVYMISSILE
                                        | weapon_info::SPECIALMISSILE
                                        | weapon_info::CAPSHIPLIGHTMISSILE
                                        | weapon_info::CAPSHIPHEAVYMISSILE);
- but was told that "ISO C++ forbids initialization of member ‘MountSizeMaskMissile’ [-fpermissive]" within the class, and if done outside, it's not useable with inlines (tried to convert isMissile() and a pair of copycats - because why not, it's faster?). So it's either all inside or all outside.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
User avatar
Elite Venturer
Elite Venturer
Posts: 750
Topics: 38
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest