From d2d51c8c2d777e4db8657663b462582b59ecffd6 Mon Sep 17 00:00:00 2001 From: Florian Pommerening Date: Thu, 25 Jul 2024 21:13:48 +0200 Subject: [PATCH] add names for basic types --- src/search/plugins/types.cc | 12 ++++++------ src/search/plugins/types.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/search/plugins/types.cc b/src/search/plugins/types.cc index c1ca2c372b..3f68ff99a9 100644 --- a/src/search/plugins/types.cc +++ b/src/search/plugins/types.cc @@ -291,16 +291,16 @@ EmptyListType TypeRegistry::EMPTY_LIST_TYPE; BasicType TypeRegistry::NO_TYPE = BasicType(typeid(void), ""); TypeRegistry::TypeRegistry() { - insert_basic_type(); - insert_basic_type(); - insert_basic_type(); - insert_basic_type(); + insert_basic_type("bool"); + insert_basic_type("string"); + insert_basic_type("int"); + insert_basic_type("double"); } template -void TypeRegistry::insert_basic_type() { +void TypeRegistry::insert_basic_type(const string &name) { type_index type = typeid(T); - registered_types[type] = utils::make_unique_ptr(type, utils::get_type_name()); + registered_types[type] = utils::make_unique_ptr(type, name); } const FeatureType &TypeRegistry::create_feature_type(const CategoryPlugin &plugin) { diff --git a/src/search/plugins/types.h b/src/search/plugins/types.h index e0bb2523dc..6ffe72b456 100644 --- a/src/search/plugins/types.h +++ b/src/search/plugins/types.h @@ -162,7 +162,7 @@ class TypeRegistry { std::unordered_map, SemanticHash, SemanticEqual> registered_list_types; template - void insert_basic_type(); + void insert_basic_type(const std::string &name); const Type &get_nonlist_type(std::type_index type) const; public: static BasicType NO_TYPE;