drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Fix compile warning (and possible bug?) #648

Closed puffetto closed 1 year ago

puffetto commented 2 years ago

Hi,

I noticed this compiler warning:

overpass_api/core/geometry.cc:1371:13: warning: implicit conversion turns floating-point number into bool: 'double' to 'bool' [-Wimplicit-conversion-floating-point-to-bool] if (::lon(uint32(value)<<16 > -180.)) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shouldn't that line be:

if (::lon(uint32(value)<<16) > -180.) ?

I am sorry but I do not know the code of overpass well enough to understand and check what the issue causes and then ask a pull.

Cheers,

A.

mmd-osm commented 2 years ago

Fixed in fad5578