diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-20 12:38:09 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-23 20:05:40 +0200 |
commit | cee3910f179c39d5dc14e6e4307f5d51bb4d1256 (patch) | |
tree | 149648aab15f6ab2c5536cc29bcf15c00880530a /src/mbgl/layout | |
parent | 47594f003bc0dbdb2419715d3f7d0e989bb332d8 (diff) | |
download | qtlocation-mapboxgl-cee3910f179c39d5dc14e6e4307f5d51bb4d1256.tar.gz |
[core] Fix modernize-return-braced-init-list errors
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl/layout')
-rw-r--r-- | src/mbgl/layout/symbol_projection.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mbgl/layout/symbol_projection.cpp b/src/mbgl/layout/symbol_projection.cpp index 628caf6eca..eecaced824 100644 --- a/src/mbgl/layout/symbol_projection.cpp +++ b/src/mbgl/layout/symbol_projection.cpp @@ -242,19 +242,17 @@ namespace mbgl { const bool returnTileDistance) { if (symbol.glyphOffsets.empty()) { assert(false); - return optional<std::pair<PlacedGlyph, PlacedGlyph>>(); + return {}; } const float firstGlyphOffset = symbol.glyphOffsets.front(); const float lastGlyphOffset = symbol.glyphOffsets.back();; optional<PlacedGlyph> firstPlacedGlyph = placeGlyphAlongLine(fontScale * firstGlyphOffset, lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment, symbol.line, symbol.tileDistances, labelPlaneMatrix, returnTileDistance); - if (!firstPlacedGlyph) - return optional<std::pair<PlacedGlyph, PlacedGlyph>>(); + if (!firstPlacedGlyph) return {}; optional<PlacedGlyph> lastPlacedGlyph = placeGlyphAlongLine(fontScale * lastGlyphOffset, lineOffsetX, lineOffsetY, flip, anchorPoint, tileAnchorPoint, symbol.segment, symbol.line, symbol.tileDistances, labelPlaneMatrix, returnTileDistance); - if (!lastPlacedGlyph) - return optional<std::pair<PlacedGlyph, PlacedGlyph>>(); + if (!lastPlacedGlyph) return {}; return std::make_pair(*firstPlacedGlyph, *lastPlacedGlyph); } |