summaryrefslogtreecommitdiff
path: root/platform/glfw
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-04 07:35:26 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-06 09:22:51 -0700
commit16a2839e23d42d4640ef028d62dc01322a0d2e5a (patch)
treeb8b8ba6e7c9f2e91cc3ec230bb9420e3827f3c27 /platform/glfw
parenta261f7ff532584b3bbbe4ddef2d0ff96a1ee65a5 (diff)
downloadqtlocation-mapboxgl-16a2839e23d42d4640ef028d62dc01322a0d2e5a.tar.gz
[all] Make LatLng coordinates read-only
Diffstat (limited to 'platform/glfw')
-rw-r--r--platform/glfw/glfw_view.cpp2
-rw-r--r--platform/glfw/main.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index 498b021bff..9e21476485 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -255,7 +255,7 @@ mbgl::Point<double> GLFWView::makeRandomPoint() const {
const double x = width * double(std::rand()) / RAND_MAX;
const double y = height * double(std::rand()) / RAND_MAX;
mbgl::LatLng latLng = map->latLngForPixel({ x, y });
- return { latLng.longitude, latLng.latitude };
+ return { latLng.longitude(), latLng.latitude() };
}
std::shared_ptr<const mbgl::SpriteImage>
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp
index fbfba0b7fb..172b7e3284 100644
--- a/platform/glfw/main.cpp
+++ b/platform/glfw/main.cpp
@@ -184,8 +184,8 @@ int main(int argc, char *argv[]) {
// Save settings
mbgl::LatLng latLng = map.getLatLng();
- settings.latitude = latLng.latitude;
- settings.longitude = latLng.longitude;
+ settings.latitude = latLng.latitude();
+ settings.longitude = latLng.longitude();
settings.zoom = map.getZoom();
settings.bearing = map.getBearing();
settings.pitch = map.getPitch();