[MPlayer-dev-eng] int vs. bool
Ingo Brückl
ib at wupperonline.de
Sat Dec 1 00:15:13 CET 2012
Reimar Döffinger wrote on Fri, 30 Nov 2012 19:42:31 +0100:
> On Fri, Nov 30, 2012 at 07:09:53PM +0100, Ingo Brückl wrote:
>> Are there any objections to using data type bool, or are there
>> disadvantages or possible problems?
I'm only referring to the GUI code, of course.
> IMHO it is not a good idea.
> 1) We are not using it anywhere, not even in FFmpeg
> 2) It was "only" added in C99 so in some special cases compiler support
> might still be lacking
> 3) In my experience, lots of developers are completely oblivious to its
> exact semantics and in particular which performance effects they have.
Would
#define bool int
#define false 0
#define true 1
in an own header file for the GUI be a better idea or don't you like bool
at all and/or recommend against it?
I think the code will become more self-explanatory than directly using 0
and 1 with int variables.
Ingo
More information about the MPlayer-dev-eng
mailing list