diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-10 18:51:04 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-12 18:07:36 +0300 |
commit | fa36110dfbdc05b511a3f85461eaca4a29e446a1 (patch) | |
tree | 284bd9a9eca229c026e531bbce1a9f0dd6ba089d /src/mbgl/util | |
parent | f709d7b0557d3e6d652d9b7d8380f1380962a327 (diff) | |
download | qtlocation-mapboxgl-fa36110dfbdc05b511a3f85461eaca4a29e446a1.tar.gz |
[tidy] modernize-use-auto
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/intersection_tests.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/thread_local.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/intersection_tests.cpp b/src/mbgl/util/intersection_tests.cpp index c580357298..e6ce245c0e 100644 --- a/src/mbgl/util/intersection_tests.cpp +++ b/src/mbgl/util/intersection_tests.cpp @@ -19,7 +19,7 @@ bool polygonContainsPoint(const GeometryCoordinates& ring, const GeometryCoordin // Code from http://stackoverflow.com/a/1501725/331379. float distToSegmentSquared(const GeometryCoordinate& p, const GeometryCoordinate& v, const GeometryCoordinate& w) { if (v == w) return util::distSqr<float>(p, v); - const float l2 = util::distSqr<float>(v, w); + const auto l2 = util::distSqr<float>(v, w); const float t = float((p.x - v.x) * (w.x - v.x) + (p.y - v.y) * (w.y - v.y)) / l2; if (t < 0) return util::distSqr<float>(p, v); if (t > 1) return util::distSqr<float>(p, w); diff --git a/src/mbgl/util/thread_local.hpp b/src/mbgl/util/thread_local.hpp index 9fddbd5bbc..15d4d56524 100644 --- a/src/mbgl/util/thread_local.hpp +++ b/src/mbgl/util/thread_local.hpp @@ -32,7 +32,7 @@ public: } T* get() { - T* ret = reinterpret_cast<T*>(pthread_getspecific(key)); + auto* ret = reinterpret_cast<T*>(pthread_getspecific(key)); if (!ret) { return nullptr; } |