[core] change std::array<uint16_t, 2> to mbgl::Size

This commit is contained in:
Konstantin Käfer
2016-10-26 15:22:31 -07:00
parent ef8017198c
commit 62b56b799a
72 changed files with 461 additions and 431 deletions

View File

@@ -7,7 +7,7 @@
namespace mbgl {
std::string encodePNG(const PremultipliedImage& pre) {
QImage image(pre.data.get(), pre.width, pre.height,
QImage image(pre.data.get(), pre.size.width, pre.size.height,
QImage::Format_ARGB32_Premultiplied);
QByteArray array;
@@ -57,7 +57,7 @@ PremultipliedImage decodeImage(const std::string& string) {
auto img = std::make_unique<uint8_t[]>(image.byteCount());
memcpy(img.get(), image.constBits(), image.byteCount());
return { static_cast<uint16_t>(image.width()), static_cast<uint16_t>(image.height()),
return { { static_cast<uint32_t>(image.width()), static_cast<uint32_t>(image.height()) },
std::move(img) };
}
}