From aa5952a890ffc5dc71c4fdfa7fca2c346d7afce3 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 24 Jan 2019 15:00:32 +0100 Subject: [PATCH] follow_me: fix casting for MSVC --- plugins/follow_me/follow_me_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/follow_me/follow_me_impl.cpp b/plugins/follow_me/follow_me_impl.cpp index 05926090ae..90ccbcf6b5 100644 --- a/plugins/follow_me/follow_me_impl.cpp +++ b/plugins/follow_me/follow_me_impl.cpp @@ -254,8 +254,8 @@ void FollowMeImpl::send_target_location() // LogDebug() << debug_str << "Lat: " << _target_location.latitude_deg << " Lon: " << // _target_location.longitude_deg << // " Alt: " << _target_location.absolute_altitude_m; - const int32_t lat_int = std::round(_target_location.latitude_deg * 1e7); - const int32_t lon_int = std::round(_target_location.longitude_deg * 1e7); + const int32_t lat_int = int32_t(std::round(_target_location.latitude_deg * 1e7)); + const int32_t lon_int = int32_t(std::round(_target_location.longitude_deg * 1e7)); const float alt = static_cast(_target_location.absolute_altitude_m); _mutex.unlock();