Browse Source

Fix warnings in opmapcontrol

I looked at the latest version of opmapcontrol in OpenPilot. This has
not yet been fixed. So added pragma to silence.
QGC4.4
Don Gagne 11 years ago
parent
commit
7b32f32ca0
  1. 10
      libs/opmapcontrol/src/internals/projections/lks94projection.cpp
  2. 15
      libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp

10
libs/opmapcontrol/src/internals/projections/lks94projection.cpp

@ -28,6 +28,11 @@
#include <qmath.h> #include <qmath.h>
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
namespace projections { namespace projections {
LKS94Projection::LKS94Projection():MinLatitude (53.33 ), MaxLatitude (56.55 ), MinLongitude (20.22 ), LKS94Projection::LKS94Projection():MinLatitude (53.33 ), MaxLatitude (56.55 ), MinLongitude (20.22 ),
@ -787,3 +792,8 @@ Size LKS94Projection::GetTileMatrixMaxXY(int const& zoom)
} }
} }
#ifdef Q_OS_LINUX
#pragma GCC diagnostic pop
#endif

15
libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp

@ -57,6 +57,16 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
return ret; return ret;
} }
// These pragmas are local modifications to this third party library to silence warnings
#ifdef Q_OS_LINUX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#elif defined(Q_OS_MAC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom) internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom)
{ {
Size s = GetTileMatrixSizePixel(zoom); Size s = GetTileMatrixSizePixel(zoom);
@ -82,6 +92,11 @@ internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x,
return ret; return ret;
} }
#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif
double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const
{ {
return qMin(qMax(n, minValue), maxValue); return qMin(qMax(n, minValue), maxValue);

Loading…
Cancel
Save