Dear all,
in core/pref.h we find the comment
/* can't use 'bool' for the boolean values - different size in C and C++ */
Ironically, the same file is full of bool struct members, so it seems to rely
on the fact that this comment is wrong. The fact is confirmed by my tests:
#include <stdio.h>
#include <stdbool.h>
int main()
{
printf("%ld\n", sizeof(bool));
}
and
#include <iostream>
int main()
{
std::cout << sizeof(bool) << '\n';
}
both output '1' for me when compiled with gcc and q++, respectively.
On the other hand, many of the boolean settings are indeed defined as short.
Shouldn't this be made consistent?
Berthold
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface