efl_ui_spotlight: fix warning of implicit conversion of floating point 03/213603/1
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 9 Sep 2019 05:23:26 +0000 (14:23 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 9 Sep 2019 06:26:18 +0000 (15:26 +0900)
The result of integral division is converted into floating point.
To fix the warning by assigning the result to integer variable, type
cast is done.

Change-Id: Icfdd614bbd100e5b54b8ed09dcf272b4dfcbde90

src/lib/elementary/efl_ui_spotlight_manager_scroll.c

index bd0000f..f382764 100644 (file)
@@ -60,7 +60,7 @@ _apply_box_properties(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd)
         double diff = i - current_pos;
         Efl_Gfx_Entity *elem = efl_pack_content_get(pd->container, i);
 
-        geometry.x = (group_pos.x + group_pos.w/2)-(pd->page_size.w/2 - diff*pd->page_size.w);
+        geometry.x = (int)((group_pos.x + group_pos.w/2)-(pd->page_size.w/2 - diff*pd->page_size.w));
         if (!eina_rectangles_intersect(&geometry.rect, &group_pos.rect))
           {
              efl_canvas_object_clipper_set(elem, pd->backclip);