From af18c8d65d748b32825d228c66c784ed00cab61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 8 Mar 2013 23:28:46 +0100 Subject: [PATCH] Adapted to Corrade and Magnum changes. --- src/Plugins/TgaImporter/Test/TgaImporterTest.cpp | 14 +++++++------- src/Plugins/TgaImporter/TgaImporter.h | 8 ++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp b/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp index 6d24dd1cb..79a2421d0 100644 --- a/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp +++ b/src/Plugins/TgaImporter/Test/TgaImporterTest.cpp @@ -36,13 +36,13 @@ class TgaImporterTest: public Corrade::TestSuite::Tester { }; TgaImporterTest::TgaImporterTest() { - addTests(&TgaImporterTest::openInexistent, - &TgaImporterTest::openShort, - &TgaImporterTest::paletted, - &TgaImporterTest::nonRgb, - &TgaImporterTest::bits16, - &TgaImporterTest::bits24, - &TgaImporterTest::bits32); + addTests({&TgaImporterTest::openInexistent, + &TgaImporterTest::openShort, + &TgaImporterTest::paletted, + &TgaImporterTest::nonRgb, + &TgaImporterTest::bits16, + &TgaImporterTest::bits24, + &TgaImporterTest::bits32}); } void TgaImporterTest::openInexistent() { diff --git a/src/Plugins/TgaImporter/TgaImporter.h b/src/Plugins/TgaImporter/TgaImporter.h index e4f1dff53..71d852f41 100644 --- a/src/Plugins/TgaImporter/TgaImporter.h +++ b/src/Plugins/TgaImporter/TgaImporter.h @@ -40,8 +40,12 @@ namespace Magnum { namespace Trade { namespace TgaImporter { /** @brief TGA importer plugin */ class TGAIMPORTER_EXPORT TgaImporter: public AbstractImporter { public: - /** @copydoc AbstractImporter::AbstractImporter() */ - TgaImporter(Corrade::PluginManager::AbstractPluginManager* manager = 0, const std::string& plugin = ""): AbstractImporter(manager, plugin), _image(nullptr) {} + /** @brief Default constructor */ + inline explicit TgaImporter(): _image(nullptr) {} + + /** @brief Plugin manager constructor */ + inline explicit TgaImporter(Corrade::PluginManager::AbstractPluginManager* manager, std::string plugin): AbstractImporter(manager, std::move(plugin)), _image(nullptr) {} + inline virtual ~TgaImporter() { close(); } inline Features features() const override { return Feature::OpenFile|Feature::OpenStream; }