From c224a4aada20b0f444a6a266fb28c6b7722f2f80 Mon Sep 17 00:00:00 2001 From: chanywa Date: Fri, 14 Jul 2017 19:24:51 +0900 Subject: [PATCH] Fix Svace defects in gerrit Change-Id: I7964e445ecd549677984f8ccb65990b50a876a14 --- src/api/maps_view_object.cpp | 8 ++++---- src/view/poly_shape_hit_test.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/maps_view_object.cpp b/src/api/maps_view_object.cpp index 67f54fe..185e519 100644 --- a/src/api/maps_view_object.cpp +++ b/src/api/maps_view_object.cpp @@ -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); diff --git a/src/view/poly_shape_hit_test.cpp b/src/view/poly_shape_hit_test.cpp index c93f4a4..943c670 100644 --- a/src/view/poly_shape_hit_test.cpp +++ b/src/view/poly_shape_hit_test.cpp @@ -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; } -- 2.7.4