Remove bugs with bitfield usage, make boolean usage clear.
This patch fixes the problem with bitfield of signed types (ie: char), where the bit would be used for the signal, so 1 is considered -0 and thus 0. Move all the single bit fields to Evas_Bool, making it clear and also avoiding these problems since Evas_Bool is unsigned char. SVN revision: 34631
This commit is contained in:
parent
3537f1033a
commit
a4ed92a1a5
|
@ -283,12 +283,12 @@ struct _Image_Entry
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned int loaded : 1;
|
Evas_Bool loaded : 1;
|
||||||
unsigned int dirty : 1;
|
Evas_Bool dirty : 1;
|
||||||
unsigned int activ : 1;
|
Evas_Bool activ : 1;
|
||||||
unsigned int need_data : 1;
|
Evas_Bool need_data : 1;
|
||||||
unsigned int lru_nodata : 1;
|
Evas_Bool lru_nodata : 1;
|
||||||
unsigned int cached : 1;
|
Evas_Bool cached : 1;
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
|
@ -320,11 +320,11 @@ struct _Engine_Image_Entry
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned int cached : 1;
|
Evas_Bool cached : 1;
|
||||||
unsigned int activ : 1;
|
Evas_Bool activ : 1;
|
||||||
unsigned int dirty : 1;
|
Evas_Bool dirty : 1;
|
||||||
unsigned int loaded : 1;
|
Evas_Bool loaded : 1;
|
||||||
unsigned int need_parent : 1;
|
Evas_Bool need_parent : 1;
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
|
@ -347,7 +347,7 @@ struct _Cutout_Rects
|
||||||
struct _RGBA_Draw_Context
|
struct _RGBA_Draw_Context
|
||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
char use : 1;
|
Evas_Bool use : 1;
|
||||||
DATA32 col;
|
DATA32 col;
|
||||||
} mul;
|
} mul;
|
||||||
struct {
|
struct {
|
||||||
|
@ -355,7 +355,7 @@ struct _RGBA_Draw_Context
|
||||||
} col;
|
} col;
|
||||||
struct RGBA_Draw_Context_clip {
|
struct RGBA_Draw_Context_clip {
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
char use : 1;
|
Evas_Bool use : 1;
|
||||||
} clip;
|
} clip;
|
||||||
Cutout_Rects cutout;
|
Cutout_Rects cutout;
|
||||||
struct {
|
struct {
|
||||||
|
@ -373,7 +373,7 @@ struct _RGBA_Draw_Context
|
||||||
int y, h;
|
int y, h;
|
||||||
} sli;
|
} sli;
|
||||||
int render_op;
|
int render_op;
|
||||||
unsigned char anti_alias : 1;
|
Evas_Bool anti_alias : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _RGBA_Pipe_Op
|
struct _RGBA_Pipe_Op
|
||||||
|
@ -448,15 +448,15 @@ struct _RGBA_Image
|
||||||
/* Colorspace stuff. */
|
/* Colorspace stuff. */
|
||||||
struct {
|
struct {
|
||||||
void *data;
|
void *data;
|
||||||
unsigned int no_free : 1;
|
Evas_Bool no_free : 1;
|
||||||
unsigned int dirty : 1;
|
Evas_Bool dirty : 1;
|
||||||
} cs;
|
} cs;
|
||||||
|
|
||||||
/* RGBA stuff */
|
/* RGBA stuff */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
DATA32 *data;
|
DATA32 *data;
|
||||||
unsigned int no_free : 1;
|
Evas_Bool no_free : 1;
|
||||||
} image;
|
} image;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -483,7 +483,7 @@ struct _RGBA_Gradient
|
||||||
float angle;
|
float angle;
|
||||||
int direction;
|
int direction;
|
||||||
float offset;
|
float offset;
|
||||||
unsigned char has_alpha : 1;
|
Evas_Bool has_alpha : 1;
|
||||||
} map;
|
} map;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
@ -515,8 +515,8 @@ struct _RGBA_Gradient
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
|
|
||||||
unsigned char imported_data : 1;
|
Evas_Bool imported_data : 1;
|
||||||
unsigned char has_alpha : 1;
|
Evas_Bool has_alpha : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _RGBA_Gradient_Type
|
struct _RGBA_Gradient_Type
|
||||||
|
@ -698,12 +698,12 @@ struct _Tilebuf
|
||||||
|
|
||||||
struct _Tilebuf_Tile
|
struct _Tilebuf_Tile
|
||||||
{
|
{
|
||||||
unsigned char redraw : 1;
|
Evas_Bool redraw : 1;
|
||||||
/* FIXME: need these flags later - but not now */
|
/* FIXME: need these flags later - but not now */
|
||||||
/*
|
/*
|
||||||
int done : 1;
|
Evas_Bool done : 1;
|
||||||
int edge : 1;
|
Evas_Bool edge : 1;
|
||||||
int from : 1;
|
Evas_Bool from : 1;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
|
|
Loading…
Reference in New Issue