Fix gcc warnings

pull/787/head
Jon Beniston 2021-02-27 11:48:43 +00:00
rodzic 8e2268d9b8
commit 8f1fe0e088
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -366,7 +366,7 @@ static bool crossesAntimeridianWest(double prevLon, double lon)
return crosses;
}
static bool crossesEdge(double lon, double prevLon, double bottomLeftLongitude, double bottomRightLongitude, double width, bool antimed)
static bool crossesEdge(double lon, double prevLon, double bottomLeftLongitude, double bottomRightLongitude)
{
// Determine if antimerdian is between the two points
if (!crossesAntimeridian(prevLon, lon))
@ -484,7 +484,7 @@ void MapModel::splitTrack(const QList<QGeoCoordinate *>& coords, const QVariantL
// Can be onscreen after having crossed edge from other side
// Or can be onscreen after previously having been off screen
onScreen = isOnScreen(lon, bottomLeftLongitude, bottomRightLongitude, width, antimed);
bool crossedEdge = crossesEdge(lon, prevLon, bottomLeftLongitude, bottomRightLongitude, width, antimed);
bool crossedEdge = crossesEdge(lon, prevLon, bottomLeftLongitude, bottomRightLongitude);
if ((onScreen && !crossedEdge) || (onScreen && !prevOnScreen))
{
if ((i > 0) && (tracks[trackIdx]->size() == 0)) // Could also use (onScreen && !prevOnScreen)?
@ -554,7 +554,8 @@ void MapModel::splitTrack(const QList<QGeoCoordinate *>& coords, const QVariantL
void MapModel::viewChanged(double bottomLeftLongitude, double bottomRightLongitude)
{
if (!isnan(bottomLeftLongitude))
(void) bottomRightLongitude;
if (!std::isnan(bottomLeftLongitude))
{
for (int row = 0; row < m_items.size(); row++)
{

Wyświetl plik

@ -26,8 +26,8 @@
#include "maincore.h"
Feature::Feature(const QString& uri, WebAPIAdapterInterface *webAPIAdapterInterface) :
m_webAPIAdapterInterface(webAPIAdapterInterface),
m_guiMessageQueue(nullptr),
m_webAPIAdapterInterface(webAPIAdapterInterface),
m_name(uri),
m_uri(uri),
m_uid(UidCalculator::getNewObjectId())