From 92e250b6001a700ad95287046eb155c248545c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 7 Oct 2012 20:08:20 +0200 Subject: [PATCH] Adapted to Magnum changes. --- .../TgaImporter/Test/TgaImporterTest.cpp | 4 +-- src/Plugins/TgaImporter/TgaImporter.cpp | 2 +- src/Plugins/TgaImporter/TgaImporter.h | 28 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp b/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp index 26e7a9809..6d7574d7b 100644 --- a/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp +++ b/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp @@ -117,7 +117,7 @@ void TgaImporterTest::bits24() { #else CORRADE_VERIFY(image->components() == AbstractImage::Components::RGB); #endif - CORRADE_COMPARE(image->dimensions(), Math::Vector2(2, 3)); + CORRADE_COMPARE(image->size(), Math::Vector2(2, 3)); CORRADE_VERIFY(image->type() == TypeTraits::imageType()); CORRADE_COMPARE(string(static_cast(image->data()), 2*3*3), string(pixels, 2*3*3)); } @@ -144,7 +144,7 @@ void TgaImporterTest::bits32() { #else CORRADE_VERIFY(image->components() == AbstractImage::Components::RGBA); #endif - CORRADE_COMPARE(image->dimensions(), Math::Vector2(2, 3)); + CORRADE_COMPARE(image->size(), Math::Vector2(2, 3)); CORRADE_VERIFY(image->type() == TypeTraits::imageType()); CORRADE_COMPARE(string(static_cast(image->data()), 2*3*3), string(pixels, 2*3*3)); } diff --git a/src/Plugins/TgaImporter/TgaImporter.cpp b/src/Plugins/TgaImporter/TgaImporter.cpp index c2551f4f4..593c774a1 100644 --- a/src/Plugins/TgaImporter/TgaImporter.cpp +++ b/src/Plugins/TgaImporter/TgaImporter.cpp @@ -124,7 +124,7 @@ void TgaImporter::close() { _image = nullptr; } -ImageData2D* TgaImporter::image2D(unsigned int) { +ImageData2D* TgaImporter::image2D(std::uint32_t) { return _image; } diff --git a/src/Plugins/TgaImporter/TgaImporter.h b/src/Plugins/TgaImporter/TgaImporter.h index 27904108c..121de819d 100644 --- a/src/Plugins/TgaImporter/TgaImporter.h +++ b/src/Plugins/TgaImporter/TgaImporter.h @@ -64,25 +64,25 @@ class TGAIMPORTER_EXPORT TgaImporter: public AbstractImporter { void close(); - inline unsigned int image2DCount() const { return _image ? 1 : 0; } - ImageData2D* image2D(unsigned int id); + inline std::uint32_t image2DCount() const { return _image ? 1 : 0; } + ImageData2D* image2D(std::uint32_t id); #pragma pack(1) /** @brief TGA file header */ /** @todoc Enable @c INLINE_SIMPLE_STRUCTS again when unclosed <component> in tagfile is fixed*/ struct TGAIMPORTER_LOCAL Header { - char identsize; /**< @brief Size of ID field that follows header (0) */ - char colorMapType; /**< @brief 0 = None, 1 = paletted */ - char imageType; /**< @brief 0 = none, 1 = indexed, 2 = rgb, 3 = grey, +8=rle */ - unsigned short colorMapStart; /**< @brief First color map entry */ - unsigned short colorMapLength; /**< @brief Number of colors */ - unsigned char colorMapBpp; /**< @brief Bits per palette entry */ - unsigned short beginX; /**< @brief %Image x origin */ - unsigned short beginY; /**< @brief %Image y origin */ - unsigned short width; /**< @brief %Image width */ - unsigned short height; /**< @brief %Image height */ - char bpp; /**< @brief Bits per pixel (8, 16, 24, 32) */ - char descriptor; /**< @brief %Image descriptor */ + std::uint8_t identsize; /**< @brief Size of ID field that follows header (0) */ + std::uint8_t colorMapType; /**< @brief 0 = None, 1 = paletted */ + std::uint8_t imageType; /**< @brief 0 = none, 1 = indexed, 2 = rgb, 3 = grey, +8=rle */ + std::uint16_t colorMapStart; /**< @brief First color map entry */ + std::uint16_t colorMapLength; /**< @brief Number of colors */ + std::uint8_t colorMapBpp; /**< @brief Bits per palette entry */ + std::uint16_t beginX; /**< @brief %Image x origin */ + std::uint16_t beginY; /**< @brief %Image y origin */ + std::uint16_t width; /**< @brief %Image width */ + std::uint16_t height; /**< @brief %Image height */ + std::uint8_t bpp; /**< @brief Bits per pixel (8, 16, 24, 32) */ + std::uint8_t descriptor; /**< @brief %Image descriptor */ }; #pragma pack(8)