diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-16 15:53:59 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-17 11:23:47 -0700 |
commit | e7154adac3985b8d877c40d16c7d4b3916c7246b (patch) | |
tree | d68c579d078488b5ace871eb8d540d5c6f630de4 /src/mbgl/sprite | |
parent | 786707649a2efcddd24fb976150b044097d74219 (diff) | |
download | qtlocation-mapboxgl-e7154adac3985b8d877c40d16c7d4b3916c7246b.tar.gz |
[core] Remove redundant SpriteAtlasElement members
Diffstat (limited to 'src/mbgl/sprite')
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.hpp | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp index 20c062a779..cc69bccdbe 100644 --- a/src/mbgl/sprite/sprite_atlas.cpp +++ b/src/mbgl/sprite/sprite_atlas.cpp @@ -22,14 +22,12 @@ SpriteAtlasElement::SpriteAtlasElement(Rect<uint16_t> rect_, : pos(std::move(rect_)), sdf(image.sdf), relativePixelRatio(image.pixelRatio / pixelRatio), - width(image.image.size.width / image.pixelRatio), - height(image.image.size.height / image.pixelRatio) { - + size{{image.image.size.width / image.pixelRatio, + image.image.size.height / image.pixelRatio}} { const float w = image.image.size.width / pixelRatio; const float h = image.image.size.height / pixelRatio; - size = {{ width, height }}; tl = {{ float(pos.x + padding) / size_.width, float(pos.y + padding) / size_.height }}; br = {{ float(pos.x + padding + w) / size_.width, float(pos.y + padding + h) / size_.height }}; } diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp index bcec26b7ba..f1681608d1 100644 --- a/src/mbgl/sprite/sprite_atlas.hpp +++ b/src/mbgl/sprite/sprite_atlas.hpp @@ -29,8 +29,6 @@ public: std::array<float, 2> size; std::array<float, 2> tl; std::array<float, 2> br; - float width; - float height; }; using IconMap = std::unordered_map<std::string, SpriteAtlasElement>; |