]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/imageloader.h
Convert empty default constructors and destructors to defaulted
[libs/gui.git] / source / graphics / imageloader.h
index 65f3c5679e2b41b66fd4d964a7a5f9a4aa2762b9..d824291eb65086aefdad641e2d9ef5dbca873a56 100644 (file)
@@ -2,24 +2,25 @@
 #define MSP_GRAPHICS_IMAGELOADER_H_
 
 #include "image.h"
+#include "mspgui_api.h"
 
 namespace Msp {
 namespace Graphics {
 
-class unsupported_image_format: public std::runtime_error
+class MSPGUI_API unsupported_image_format: public std::runtime_error
 {
 public:
        unsupported_image_format(const std::string &w): std::runtime_error(w) { }
 };
 
-class bad_image_data: public std::runtime_error
+class MSPGUI_API bad_image_data: public std::runtime_error
 {
 public:
        bad_image_data(const std::string &w): std::runtime_error(w) { }
 };
 
 
-class ImageLoader
+class MSPGUI_API ImageLoader
 {
 public:
        enum State
@@ -33,9 +34,9 @@ protected:
        class RegisterBase
        {
        protected:
-               RegisterBase() { }
+               RegisterBase() = default;
        public:
-               virtual ~RegisterBase() { }
+               virtual ~RegisterBase() = default;
 
                virtual unsigned get_signature_size() const = 0;
                virtual bool detect(const std::string &) const = 0;
@@ -53,14 +54,14 @@ protected:
 
        struct Registry
        {
-               std::list<RegisterBase *> loaders;
+               std::vector<RegisterBase *> loaders;
                bool changed = false;
 
                ~Registry();
        };
 
 private:
-       IO::Base *source = 0;
+       IO::Base *source = nullptr;
        State state = INITIAL;
 
 protected:
@@ -85,8 +86,6 @@ public:
        static void register_loader();
 private:
        static Registry &get_registry();
-
-       static bool signature_size_compare(RegisterBase *, RegisterBase *);
 };
 
 template<typename T>