diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-10-31 15:52:44 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-11-01 10:49:07 -0700 |
commit | d93b2929decbdc881a504e293b80c89fb2176a7d (patch) | |
tree | 3b0d9b630749f00218d5722ab96bf66ce1338576 | |
parent | c95e6895316cc3ebaf340824db1164a9231800e5 (diff) | |
download | qtlocation-mapboxgl-d93b2929decbdc881a504e293b80c89fb2176a7d.tar.gz |
Changes for circle-ci clang-tidy.
-rw-r--r-- | src/mbgl/layout/symbol_projection.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/text/collision_index.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/text/cross_tile_symbol_index.hpp | 1 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/layout/symbol_projection.hpp b/src/mbgl/layout/symbol_projection.hpp index 5f4f919c93..08c265a891 100644 --- a/src/mbgl/layout/symbol_projection.hpp +++ b/src/mbgl/layout/symbol_projection.hpp @@ -35,7 +35,7 @@ namespace mbgl { mat4 getLabelPlaneMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits); mat4 getGlCoordMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits); - typedef std::pair<Point<float>,float> PointAndCameraDistance; + using PointAndCameraDistance = std::pair<Point<float>,float>; PointAndCameraDistance project(const Point<float>& point, const mat4& matrix); void reprojectLineLabels(gl::VertexVector<SymbolDynamicLayoutAttributes::Vertex>&, const std::vector<PlacedSymbol>&, diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index da8514c4cf..39d8dbf804 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -19,9 +19,9 @@ namespace mbgl { class PlacedSymbol { public: PlacedSymbol(Point<float> anchorPoint_, uint16_t segment_, float lowerSize_, float upperSize_, - std::array<float, 2> lineOffset_, WritingModeType writingModes_, const GeometryCoordinates& line_, const std::vector<float>& tileDistances_) : + std::array<float, 2> lineOffset_, WritingModeType writingModes_, GeometryCoordinates line_, std::vector<float> tileDistances_) : anchorPoint(anchorPoint_), segment(segment_), lowerSize(lowerSize_), upperSize(upperSize_), - lineOffset(lineOffset_), writingModes(writingModes_), line(line_), tileDistances(tileDistances_), hidden(false), vertexStartIndex(0) + lineOffset(lineOffset_), writingModes(writingModes_), line(std::move(line_)), tileDistances(std::move(tileDistances_)), hidden(false), vertexStartIndex(0) { } Point<float> anchorPoint; diff --git a/src/mbgl/text/collision_index.cpp b/src/mbgl/text/collision_index.cpp index d6ca55bbd2..acd032c72d 100644 --- a/src/mbgl/text/collision_index.cpp +++ b/src/mbgl/text/collision_index.cpp @@ -265,7 +265,7 @@ std::vector<IndexedSubfeature> CollisionIndex::queryRenderedSymbols(const Geomet polygon.push_back(convertPoint<int16_t>(projected)); } - typedef std::pair<IndexedSubfeature, GridIndex<IndexedSubfeature>::BBox> QueryResult; + using QueryResult = std::pair<IndexedSubfeature, GridIndex<IndexedSubfeature>::BBox>; std::vector<QueryResult> thisTileFeatures; std::vector<QueryResult> features = collisionGrid.queryWithBoxes({{minX, minY}, {maxX, maxY}}); diff --git a/src/mbgl/text/cross_tile_symbol_index.hpp b/src/mbgl/text/cross_tile_symbol_index.hpp index 3358c59366..5d2551d2ea 100644 --- a/src/mbgl/text/cross_tile_symbol_index.hpp +++ b/src/mbgl/text/cross_tile_symbol_index.hpp @@ -8,6 +8,7 @@ #include <map> #include <vector> #include <string> +#include <memory> namespace mbgl { |