|
Geometry : |
Subject: Re: [geometry] error C4244: 'initializing' : conversion from '__int64' to 'const double', possible loss of data ...\boost_1_55_0\boost\geometry\strategies\cartesian\distance_projected_point.hpp(146)
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-11-14 09:22:47
On 14 November 2013 13:50, Volker Schöch <vschoech_at_[hidden]> wrote:
> Two out of three warnings that I got with boost geometry have been
> eliminated from 1.52.0 to 1.55.0. Thank you for that!
>
>
>
> Maybe you can squeeze out the remaining warning with one of the next
> versions?
>
>
>
> error C4244: 'initializing' : conversion from '__int64' to 'const double',
> possible loss of data
> ...\boost_1_55_0\boost\geometry\strategies\cartesian\distance_projected_point.hpp(146)
>
I think the dot_product result needs to be promoted to calculation_type
explicitly:
calculation_type const c1 = calculation_type(dot_product(v,v));
because here are three types interfered: two for selection of coordinate
type
in dot_product and third for the calculation_type.
It is necessary if both float-point and integral types are of the same
size, compiler will complain.
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net