[qt] add missing const (#72)

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
This commit is contained in:
Nuno Goncalves
2021-05-04 19:50:19 +02:00
committed by GitHub
parent f0c3ba6fe2
commit 6128a97c9a
2 changed files with 11 additions and 6 deletions

View File

@@ -218,8 +218,11 @@ public:
QPointF pixelForCoordinate(const QMapbox::Coordinate &) const;
QMapbox::Coordinate coordinateForPixel(const QPointF &) const;
QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne) const;
QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne, double bearing, double pitch);
QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw, const QMapbox::Coordinate &ne) const;
QMapbox::CoordinateZoom coordinateZoomForBounds(const QMapbox::Coordinate &sw,
const QMapbox::Coordinate &ne,
double bearing,
double pitch);
void setMargins(const QMargins &margins);
QMargins margins() const;

View File

@@ -1196,8 +1196,8 @@ QMapbox::Coordinate QMapboxGL::coordinateForPixel(const QPointF &pixel) const
Returns the coordinate and zoom combination needed in order to make the coordinate
bounding box \a sw and \a ne visible.
*/
QMapbox::CoordinateZoom QMapboxGL::coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne) const
{
QMapbox::CoordinateZoom QMapboxGL::coordinateZoomForBounds(const QMapbox::Coordinate &sw,
const QMapbox::Coordinate &ne) const {
auto bounds = mbgl::LatLngBounds::hull(mbgl::LatLng { sw.first, sw.second }, mbgl::LatLng { ne.first, ne.second });
mbgl::CameraOptions camera = d_ptr->mapObj->cameraForLatLngBounds(bounds, d_ptr->margins);
@@ -1208,8 +1208,10 @@ QMapbox::CoordinateZoom QMapboxGL::coordinateZoomForBounds(const QMapbox::Coordi
Returns the coordinate and zoom combination needed in order to make the coordinate
bounding box \a sw and \a ne visible taking into account \a newBearing and \a newPitch.
*/
QMapbox::CoordinateZoom QMapboxGL::coordinateZoomForBounds(const QMapbox::Coordinate &sw, QMapbox::Coordinate &ne,
double newBearing, double newPitch)
QMapbox::CoordinateZoom QMapboxGL::coordinateZoomForBounds(const QMapbox::Coordinate &sw,
const QMapbox::Coordinate &ne,
double newBearing,
double newPitch)
{
auto bounds = mbgl::LatLngBounds::hull(mbgl::LatLng { sw.first, sw.second }, mbgl::LatLng { ne.first, ne.second });