Classes, types & inlines

Post Reply
Elite Venturer
Elite Venturer
Posts: 752
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Classes, types & inlines

Post by TBeholder »

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
Post Reply