I believe chili was talking aboutSlidy wrote: ↑August 25th, 2019, 3:30 amYou just type the FLAG_ prefix and all the options come up. Also typically the enum will be typed (in which case you could also do EnumType:: and get all the options) or the function will have a comment telling you which flags are relevant, no docs digging necessary.chili wrote: ↑August 21st, 2019, 3:28 pmDefinitely disagree there. If I type Foo and hit my intellisense, it tells me i got 3 bools and tells me their names. EZPZ.
With your situation, all I get is <int flags>. Oh great, now I gotta go digging in the docs to try and find this shit. :kms:
Flags are easier for skimming code (esp. without an IDE) tho, I will admit that.
void Foo( bool _flag0, bool _flag1, bool _flag2 )
as opposed to
void Foo( int _flags )
Comments are guaranteed, neither accurate nor complete.
Luckily, with the WinAPI at least, the flag macros are prefixed
CS_ for class style
WS_ for window style
WM_ for window message
SW_ for show window
and so on, so it is a little easier to at least know which set of flags can be sent to Foo( int )
#define FOO_FLAGS_DESTROY_WORLD 0x01
#define FOO_FLAGS_SAVE_ANIMALS 0x02
#define FOO_FLAGS_POISON_WATER 0x04
#define FOO_FLAGS_CULTIVATE_SOIL 0x08