diff options
Diffstat (limited to 'src/style/sprite.cpp')
-rw-r--r-- | src/style/sprite.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/style/sprite.cpp b/src/style/sprite.cpp index 3998afc628..9b0c091679 100644 --- a/src/style/sprite.cpp +++ b/src/style/sprite.cpp @@ -20,11 +20,9 @@ ImagePosition::ImagePosition(const vec2<uint16_t>& size, vec2<float> tl, vec2<fl tl(tl), br(br) {} -Sprite::Sprite() { - raster = std::make_shared<Raster>(); -} +Sprite::Sprite(float pixelRatio) : pixelRatio(pixelRatio), raster(std::make_shared<Raster>()) {} -void Sprite::load(const std::string& base_url, float pixelRatio) { +void Sprite::load(const std::string& base_url) { std::shared_ptr<Sprite> sprite = shared_from_this(); auto complete = [sprite]() { |