Skip to content

Commit

Permalink
Fix warnings in opmapcontrol
Browse files Browse the repository at this point in the history
I looked at the latest version of opmapcontrol in OpenPilot. This has
not yet been fixed. So added pragma to silence.
  • Loading branch information
DonLakeFlyer committed Feb 15, 2014
1 parent 35fbc63 commit 7b32f32
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/opmapcontrol/src/internals/projections/lks94projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#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 {
LKS94Projection::LKS94Projection():MinLatitude (53.33 ), MaxLatitude (56.55 ), MinLongitude (20.22 ),
Expand Down Expand Up @@ -787,3 +792,8 @@ Size LKS94Projection::GetTileMatrixMaxXY(int const& zoom)
}

}

#ifdef Q_OS_LINUX
#pragma GCC diagnostic pop
#endif

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
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)
{
Size s = GetTileMatrixSizePixel(zoom);
Expand All @@ -82,6 +92,11 @@ internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x,

return ret;
}

#ifndef Q_OS_WIN
#pragma GCC diagnostic pop
#endif

double MercatorProjectionYandex::Clip(const double &n, const double &minValue, const double &maxValue) const
{
return qMin(qMax(n, minValue), maxValue);
Expand Down

0 comments on commit 7b32f32

Please sign in to comment.