From f0fbdcb63d027cc5b2e117bc29935c7438529c49 Mon Sep 17 00:00:00 2001 From: Florian Pommerening Date: Fri, 26 Jul 2024 10:24:44 +0200 Subject: [PATCH] [issue1144] Ensure string parameters are listed as string in the documentation. Previously, string parameters showed up as std::cxx11::basic_string. --- 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;