X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/0cdbf9ea69482a979e0fde15e75fef3597ab8b07..HEAD:/named_object_list.h diff --git a/named_object_list.h b/named_object_list.h index 94d281e..7731a89 100644 --- a/named_object_list.h +++ b/named_object_list.h @@ -24,6 +24,7 @@ protected: std::string description; creator_base(const std::string& descr): description(descr) { } creator_base(const char* descr): description(descr) { } + virtual ~creator_base() { } virtual Base* operator()() const = 0; }; @@ -64,7 +65,7 @@ public: if (it != assoc.end()) return (*it->second)(); else - return NULL; + return nullptr; } const std::string& get_name(iterator& it) const { return it->first; } @@ -87,6 +88,7 @@ protected: std::string description; creator_base(const std::string& descr): description(descr) { } creator_base(const char* descr): description(descr) { } + virtual ~creator_base() { } virtual Base* operator()(Arg1, Arg2) const = 0; }; @@ -128,7 +130,7 @@ public: if (it != assoc.end()) return (*it->second)(arg1, arg2); else - return NULL; + return nullptr; } const std::string& get_name(iterator& it) const { return it->first; }