Fix Svace defects in gerrit 53/138953/2
authorchanywa <cbible.kim@samsung.com>
Fri, 14 Jul 2017 10:24:51 +0000 (19:24 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 14 Jul 2017 10:37:44 +0000 (19:37 +0900)
Change-Id: I7964e445ecd549677984f8ccb65990b50a876a14

src/api/maps_view_object.cpp
src/view/poly_shape_hit_test.cpp

index 67f54fe..185e519 100644 (file)
@@ -1110,10 +1110,10 @@ int _maps_view_object_overlay_set_bubble(maps_view_object_h overlay)
        cairo_paint_with_alpha(cairo, 0);
 
        /* set the size of bubble */
-       int bx = x + 2;
-       int by = y + 2;
-       int bw = w - bx * 2;
-       int bh = h - by - _OVERLAY_BUBBLE_PIN_SIZE;
+       double bx = x + 2;
+       double by = y + 2;
+       double bw = w - bx * 2;
+       double bh = h - by - _OVERLAY_BUBBLE_PIN_SIZE;
 
        /* build a path */
        cairo_new_path(cairo);
index c93f4a4..943c670 100644 (file)
@@ -95,8 +95,8 @@ bool view::poly_shape_hit_test::hit_test_segment(const float x1, const float y1,
        float y_rotated = x_shifted * sina - y_shifted * cosa;
 
        if ((x_rotated >= 0) && (x_rotated <= c)
-          && (y_rotated >= (-1. * (accuracy + w / 2)))
-          && (y_rotated <=  (accuracy + w / 2)))
+          && (y_rotated >= (-1. * (accuracy + (float)w / 2))
+          && (y_rotated <= (accuracy + (float)w / 2)))
                return true;
        return false;
 }