diff options
Diffstat (limited to 'src/mbgl/text')
-rw-r--r-- | src/mbgl/text/collision_tile.hpp | 8 | ||||
-rw-r--r-- | src/mbgl/text/glyph.hpp | 13 | ||||
-rw-r--r-- | src/mbgl/text/glyph_range.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/text/quads.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/text/quads.hpp | 2 |
5 files changed, 14 insertions, 15 deletions
diff --git a/src/mbgl/text/collision_tile.hpp b/src/mbgl/text/collision_tile.hpp index ea4324edaf..653ea74489 100644 --- a/src/mbgl/text/collision_tile.hpp +++ b/src/mbgl/text/collision_tile.hpp @@ -28,10 +28,10 @@ namespace mbgl { namespace bg = boost::geometry; namespace bgm = bg::model; namespace bgi = bg::index; -typedef bgm::point<float, 2, bg::cs::cartesian> CollisionPoint; -typedef bgm::box<CollisionPoint> Box; -typedef std::tuple<Box, CollisionBox, IndexedSubfeature> CollisionTreeBox; -typedef bgi::rtree<CollisionTreeBox, bgi::linear<16, 4>> Tree; +using CollisionPoint = bgm::point<float, 2, bg::cs::cartesian>; +using Box = bgm::box<CollisionPoint>; +using CollisionTreeBox = std::tuple<Box, CollisionBox, IndexedSubfeature>; +using Tree = bgi::rtree<CollisionTreeBox, bgi::linear<16, 4>>; class IndexedSubfeature; diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index 9cf39de840..458cd688ad 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -13,8 +13,8 @@ namespace mbgl { -typedef char16_t GlyphID; -typedef std::set<GlyphID> GlyphIDs; +using GlyphID = char16_t; +using GlyphIDs = std::set<GlyphID>; // Note: this only works for the BMP GlyphRange getGlyphRange(GlyphID glyph); @@ -40,8 +40,8 @@ struct Glyph { GlyphMetrics metrics; }; -typedef std::map<GlyphID, optional<Glyph>> GlyphPositions; -typedef std::map<FontStack, GlyphPositions> GlyphPositionMap; +using GlyphPositions = std::map<GlyphID, optional<Glyph>>; +using GlyphPositionMap = std::map<FontStack, GlyphPositions>; class PositionedGlyph { public: @@ -97,8 +97,7 @@ constexpr WritingModeType operator~(WritingModeType value) { return WritingModeType(~mbgl::underlying_type(value)); } -typedef std::map<FontStack,GlyphIDs> GlyphDependencies; -typedef std::map<FontStack,GlyphRangeSet> GlyphRangeDependencies; - +using GlyphDependencies = std::map<FontStack,GlyphIDs>; +using GlyphRangeDependencies = std::map<FontStack,GlyphRangeSet>; } // end namespace mbgl diff --git a/src/mbgl/text/glyph_range.hpp b/src/mbgl/text/glyph_range.hpp index dd39e092b7..74afb73dfc 100644 --- a/src/mbgl/text/glyph_range.hpp +++ b/src/mbgl/text/glyph_range.hpp @@ -7,7 +7,7 @@ namespace mbgl { -typedef std::pair<uint16_t, uint16_t> GlyphRange; +using GlyphRange = std::pair<uint16_t, uint16_t>; struct GlyphRangeHash { std::size_t operator()(const GlyphRange& glyphRange) const { @@ -15,7 +15,7 @@ struct GlyphRangeHash { } }; -typedef std::unordered_set<GlyphRange, GlyphRangeHash> GlyphRangeSet; +using GlyphRangeSet = std::unordered_set<GlyphRange, GlyphRangeHash>; constexpr uint32_t GLYPHS_PER_GLYPH_RANGE = 256; constexpr uint32_t GLYPH_RANGES_PER_FONT_STACK = 256; diff --git a/src/mbgl/text/quads.cpp b/src/mbgl/text/quads.cpp index 02236b1b89..6f13331d4c 100644 --- a/src/mbgl/text/quads.cpp +++ b/src/mbgl/text/quads.cpp @@ -108,7 +108,7 @@ struct GlyphInstance { const float angle = 0.0f; }; -typedef std::vector<GlyphInstance> GlyphInstances; +using GlyphInstances = std::vector<GlyphInstance>; struct VirtualSegment { Point<float> anchor; diff --git a/src/mbgl/text/quads.hpp b/src/mbgl/text/quads.hpp index 333000627b..38dad95243 100644 --- a/src/mbgl/text/quads.hpp +++ b/src/mbgl/text/quads.hpp @@ -49,7 +49,7 @@ public: WritingModeType writingMode; }; -typedef std::vector<SymbolQuad> SymbolQuads; +using SymbolQuads = std::vector<SymbolQuad>; SymbolQuad getIconQuad(const Anchor& anchor, const PositionedIcon& shapedIcon, |