
On 30-8-2014 19:47, Liam White wrote:
While browsing through header files in experimental I found these sort of things: sp-object.h unsigned int cloned : 1;
unsigned int set : 1; unsigned int value : 1;
sp-namedview.h unsigned int editable : 1; unsigned int showguides : 1; unsigned int showborder : 1; unsigned int showpageshadow : 1;
These look very much like a holdover from C which did not have a boolean type like C does. Is there any viable reason for not simply converting these to boolean?
There are other, similar things that I saw as well (sp-namedview.h):
unsigned int borderlayer : 2;
and I believe this variable is meant to hold an enum type. Should it just be changed to the type of the enum with no alignment or is there a reason to not do that?
Regardless of optimizations, unsigned int abc : 1; should be changed to bool abc : 1;
-Johan