forked from enlightenment/efl
efl: fix misleading indentation
GCC's -Wmisleading-indentation is complaining... It is a warning flag introduced in GCC 6.x, and is enabled by -Wall.
This commit is contained in:
parent
64ce45b9b4
commit
147ef32b2b
|
@ -200,11 +200,9 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
|||
|
||||
_evas_walk(e);
|
||||
|
||||
if (type == EVAS_CALLBACK_MOVE &&
|
||||
obj->move_ref == 0)
|
||||
if ((type == EVAS_CALLBACK_MOVE) && (obj->move_ref == 0))
|
||||
goto nothing_here;
|
||||
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case EVAS_CALLBACK_MOUSE_DOWN:
|
||||
|
@ -249,7 +247,6 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
|
|||
Evas_Event_Mouse_Up *ev = event_info;
|
||||
ev->flags = flags;
|
||||
}
|
||||
}
|
||||
|
||||
nothing_here:
|
||||
if (!obj->no_propagate)
|
||||
|
|
|
@ -949,7 +949,8 @@ _evas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
|
||||
if (obj->delete_me) return;
|
||||
if (!obj->layer) return;
|
||||
if (w < 0) w = 0; if (h < 0) h = 0;
|
||||
if (w < 0) w = 0;
|
||||
if (h < 0) h = 0;
|
||||
|
||||
evas_object_async_block(obj);
|
||||
if (evas_object_intercept_call_resize(eo_obj, obj, w, h)) return;
|
||||
|
@ -1022,7 +1023,10 @@ EAPI void
|
|||
evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
||||
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
MAGIC_CHECK_END();
|
||||
efl_gfx_position_get((Eo *)eo_obj, x, y);
|
||||
|
@ -1036,7 +1040,8 @@ _evas_object_efl_gfx_position_get(Eo *obj EINA_UNUSED,
|
|||
{
|
||||
if ((pd->delete_me) || (!pd->layer))
|
||||
{
|
||||
if (x) *x = 0; if (y) *y = 0;
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1051,7 +1056,8 @@ _evas_object_efl_gfx_size_get(Eo *obj EINA_UNUSED,
|
|||
{
|
||||
if (pd->delete_me)
|
||||
{
|
||||
if (w) *w = 0; if (h) *h = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1102,7 +1108,8 @@ _evas_object_size_hint_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Dat
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (w) *w = 0; if (h) *h = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
if (w) *w = obj->size_hints->min.w;
|
||||
|
@ -1128,7 +1135,8 @@ _evas_object_size_hint_max_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Dat
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (w) *w = -1; if (h) *h = -1;
|
||||
if (w) *w = -1;
|
||||
if (h) *h = -1;
|
||||
return;
|
||||
}
|
||||
if (w) *w = obj->size_hints->max.w;
|
||||
|
@ -1154,7 +1162,8 @@ _evas_object_size_hint_request_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (w) *w = 0; if (h) *h = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
if (w) *w = obj->size_hints->request.w;
|
||||
|
@ -1181,7 +1190,8 @@ _evas_object_size_hint_aspect_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_
|
|||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
|
||||
if (w) *w = 0; if (h) *h = 0;
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
return;
|
||||
}
|
||||
if (aspect) *aspect = obj->size_hints->aspect.mode;
|
||||
|
@ -1209,7 +1219,8 @@ _evas_object_size_hint_align_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_D
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (x) *x = 0.5; if (y) *y = 0.5;
|
||||
if (x) *x = 0.5;
|
||||
if (y) *y = 0.5;
|
||||
return;
|
||||
}
|
||||
if (x) *x = obj->size_hints->align.x;
|
||||
|
@ -1235,7 +1246,8 @@ _evas_object_size_hint_weight_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (x) *x = 0.0; if (y) *y = 0.0;
|
||||
if (x) *x = 0.0;
|
||||
if (y) *y = 0.0;
|
||||
return;
|
||||
}
|
||||
if (x) *x = obj->size_hints->weight.x;
|
||||
|
@ -1261,8 +1273,10 @@ _evas_object_size_hint_padding_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected
|
|||
{
|
||||
if ((!obj->size_hints) || obj->delete_me)
|
||||
{
|
||||
if (l) *l = 0; if (r) *r = 0;
|
||||
if (t) *t = 0; if (b) *b = 0;
|
||||
if (l) *l = 0;
|
||||
if (r) *r = 0;
|
||||
if (t) *t = 0;
|
||||
if (b) *b = 0;
|
||||
return;
|
||||
}
|
||||
if (l) *l = obj->size_hints->padding.l;
|
||||
|
@ -1506,10 +1520,14 @@ _evas_object_efl_gfx_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
int r, int g, int b, int a)
|
||||
{
|
||||
if (obj->delete_me) return;
|
||||
if (r > 255) r = 255; if (r < 0) r = 0;
|
||||
if (g > 255) g = 255; if (g < 0) g = 0;
|
||||
if (b > 255) b = 255; if (b < 0) b = 0;
|
||||
if (a > 255) a = 255; if (a < 0) a = 0;
|
||||
if (r > 255) r = 255;
|
||||
if (r < 0) r = 0;
|
||||
if (g > 255) g = 255;
|
||||
if (g < 0) g = 0;
|
||||
if (b > 255) b = 255;
|
||||
if (b < 0) b = 0;
|
||||
if (a > 255) a = 255;
|
||||
if (a < 0) a = 0;
|
||||
if (r > a)
|
||||
{
|
||||
r = a;
|
||||
|
@ -1582,7 +1600,10 @@ _evas_object_efl_gfx_color_get(Eo *eo_obj EINA_UNUSED,
|
|||
{
|
||||
if (obj->delete_me)
|
||||
{
|
||||
if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
|
||||
if (r) *r = 0;
|
||||
if (g) *g = 0;
|
||||
if (b) *b = 0;
|
||||
if (a) *a = 0;
|
||||
return;
|
||||
}
|
||||
if (r) *r = obj->cur->color.r;
|
||||
|
|
|
@ -1266,10 +1266,14 @@ _evas_textgrid_palette_set(Eo *eo_obj, Evas_Textgrid_Data *o, Evas_Textgrid_Pale
|
|||
|
||||
if ((idx < 0) || (idx > 255)) return;
|
||||
|
||||
if (a > 255) a = 255; if (a < 0) a = 0;
|
||||
if (r > 255) r = 255; if (r < 0) r = 0;
|
||||
if (g > 255) g = 255; if (g < 0) g = 0;
|
||||
if (b > 255) b = 255; if (b < 0) b = 0;
|
||||
if (a > 255) a = 255;
|
||||
if (a < 0) a = 0;
|
||||
if (r > 255) r = 255;
|
||||
if (r < 0) r = 0;
|
||||
if (g > 255) g = 255;
|
||||
if (g < 0) g = 0;
|
||||
if (b > 255) b = 255;
|
||||
if (b < 0) b = 0;
|
||||
if (r > a)
|
||||
{
|
||||
r = a;
|
||||
|
|
|
@ -128,10 +128,14 @@ _efl_vg_efl_gfx_color_set(Eo *obj EINA_UNUSED,
|
|||
Efl_VG_Data *pd,
|
||||
int r, int g, int b, int a)
|
||||
{
|
||||
if (r > 255) r = 255; if (r < 0) r = 0;
|
||||
if (g > 255) g = 255; if (g < 0) g = 0;
|
||||
if (b > 255) b = 255; if (b < 0) b = 0;
|
||||
if (a > 255) a = 255; if (a < 0) a = 0;
|
||||
if (r > 255) r = 255;
|
||||
if (r < 0) r = 0;
|
||||
if (g > 255) g = 255;
|
||||
if (g < 0) g = 0;
|
||||
if (b > 255) b = 255;
|
||||
if (b < 0) b = 0;
|
||||
if (a > 255) a = 255;
|
||||
if (a < 0) a = 0;
|
||||
if (r > a)
|
||||
{
|
||||
r = a;
|
||||
|
|
|
@ -157,22 +157,34 @@ evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g,
|
|||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
if (r) *r = v - f; if (g) *g = v; if (b) *b = s;
|
||||
if (r) *r = v - f;
|
||||
if (g) *g = v;
|
||||
if (b) *b = s;
|
||||
return;
|
||||
case 2:
|
||||
if (r) *r = s; if (g) *g = v; if (b) *b = s + f;
|
||||
if (r) *r = s;
|
||||
if (g) *g = v;
|
||||
if (b) *b = s + f;
|
||||
return;
|
||||
case 3:
|
||||
if (r) *r = s; if (g) *g = v - f; if (b) *b = v;
|
||||
if (r) *r = s;
|
||||
if (g) *g = v - f;
|
||||
if (b) *b = v;
|
||||
return;
|
||||
case 4:
|
||||
if (r) *r = s + f; if (g) *g = s; if (b) *b = v;
|
||||
if (r) *r = s + f;
|
||||
if (g) *g = s;
|
||||
if (b) *b = v;
|
||||
return;
|
||||
case 5:
|
||||
if (r) *r = v; if (g) *g = s; if (b) *b = v - f;
|
||||
if (r) *r = v;
|
||||
if (g) *g = s;
|
||||
if (b) *b = v - f;
|
||||
return;
|
||||
default:
|
||||
if (r) *r = v; if (g) *g = s + f; if (b) *b = s;
|
||||
if (r) *r = v;
|
||||
if (g) *g = s + f;
|
||||
if (b) *b = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2797,9 +2797,12 @@ rg_etc1_pack_block(void* pETC1_block, const unsigned int* pSrc_pixels_BGRA, rg_e
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dr < 0) dr += 8; dst_block[0] = (uint8)((best_results[0].m_block_color_unscaled.comp.r << 3) | dr);
|
||||
if (dg < 0) dg += 8; dst_block[1] = (uint8)((best_results[0].m_block_color_unscaled.comp.g << 3) | dg);
|
||||
if (db < 0) db += 8; dst_block[2] = (uint8)((best_results[0].m_block_color_unscaled.comp.b << 3) | db);
|
||||
if (dr < 0) dr += 8;
|
||||
dst_block[0] = (uint8)((best_results[0].m_block_color_unscaled.comp.r << 3) | dr);
|
||||
if (dg < 0) dg += 8;
|
||||
dst_block[1] = (uint8)((best_results[0].m_block_color_unscaled.comp.g << 3) | dg);
|
||||
if (db < 0) db += 8;
|
||||
dst_block[2] = (uint8)((best_results[0].m_block_color_unscaled.comp.b << 3) | db);
|
||||
}
|
||||
|
||||
dst_block[3] = (uint8)((best_results[1].m_block_inten_table << 2) |
|
||||
|
|
Loading…
Reference in New Issue