From 19ef09d51de4873d30d986e267d070699fc187de Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 4 Sep 2023 02:07:26 +0300 Subject: [PATCH] Update Variant API usage --- source/collection.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/collection.h b/source/collection.h index a0717cf..fc5ac3c 100644 --- a/source/collection.h +++ b/source/collection.h @@ -234,7 +234,7 @@ private: return get_status(name, *type); ItemMap::const_iterator i = items.find(name); - return (i!=items.end() && i->second.check_type >()); + return (i!=items.end() && i->second.has_type >()); } public: @@ -256,7 +256,7 @@ public: typedef RefPtr::type> RPNCT; for(const auto &kvp: items) - if(kvp.second.check_type()) + if(kvp.second.has_type()) if(kvp.second.value().get()==d) return kvp.first; @@ -456,7 +456,7 @@ public: { return dynamic_cast *>(&other); } bool check_item_type(const Variant &var) const override - { return var.check_type >(); } + { return var.has_type >(); } void add_to_loader(Collection::Loader &) const override { } @@ -508,7 +508,7 @@ public: template T &Collection::extract(const Variant &var) const { - if(!var.check_type >()) + if(!var.has_type >()) if(CollectionItemTypeBase *type = get_type_for_item(var)) if(T *item = type->extract(var)) return *item; -- 2.45.2