1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 11:39:16 +02:00

Removed debug stuff from release builds

This commit is contained in:
2018-02-13 23:03:18 +01:00
parent 18fc6cc3e2
commit b6e798f5c3
35 changed files with 82 additions and 7 deletions

View File

@ -16,12 +16,6 @@ qreal Coordinates::distanceTo(const Coordinates &c) const
return (WGS84_RADIUS * (2.0 * atan2(sqrt(a), sqrt(1.0 - a))));
}
QDebug operator<<(QDebug dbg, const Coordinates &c)
{
dbg.nospace() << "Coordinates(" << c.lon() << ", " << c.lat() << ")";
return dbg.space();
}
QPair<Coordinates, Coordinates> Coordinates::boundingRect(qreal distance) const
{
qreal radDist = distance / WGS84_RADIUS;
@ -50,3 +44,11 @@ QPair<Coordinates, Coordinates> Coordinates::boundingRect(qreal distance) const
maxLon)), rad2deg(qMin(minLat, maxLat))), Coordinates(rad2deg(qMax(minLon,
maxLon)), rad2deg(qMax(minLat, maxLat))));
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Coordinates &c)
{
dbg.nospace() << "Coordinates(" << c.lon() << ", " << c.lat() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -43,6 +43,8 @@ inline bool operator==(const Coordinates &c1, const Coordinates &c2)
inline bool operator!=(const Coordinates &c1, const Coordinates &c2)
{return !(c1 == c2);}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Coordinates &c);
#endif // QT_NO_DEBUG
#endif // COORDINATES_H

View File

@ -8,6 +8,7 @@ void RangeF::resize(qreal size)
_max += adj;
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Range &range)
{
dbg.nospace() << "Range(" << range.min() << ", " << range.max() << ")";
@ -19,3 +20,4 @@ QDebug operator<<(QDebug dbg, const RangeF &range)
dbg.nospace() << "RangeF(" << range.min() << ", " << range.max() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -34,7 +34,9 @@ private:
qreal _min, _max;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Range &range);
QDebug operator<<(QDebug dbg, const RangeF &range);
#endif // QT_NO_DEBUG
#endif // RANGE_H

View File

@ -61,8 +61,10 @@ void RectC::unite(const Coordinates &c)
}
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const RectC &rect)
{
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.size() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -37,6 +37,8 @@ private:
Coordinates _tl, _br;
};
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const RectC &rect);
#endif // QT_NO_DEBUG
#endif // RECTC_H