Skip to content

Commit

Permalink
[issue1144] Ensure string parameters are listed as string in the docu…
Browse files Browse the repository at this point in the history
…mentation.

Previously, string parameters showed up as std::cxx11::basic_string<char>.
  • Loading branch information
FlorianPommerening authored Jul 26, 2024
1 parent 261b03e commit f0fbdcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/search/plugins/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,16 @@ EmptyListType TypeRegistry::EMPTY_LIST_TYPE;
BasicType TypeRegistry::NO_TYPE = BasicType(typeid(void), "<no type>");

TypeRegistry::TypeRegistry() {
insert_basic_type<bool>();
insert_basic_type<string>();
insert_basic_type<int>();
insert_basic_type<double>();
insert_basic_type<bool>("bool");
insert_basic_type<string>("string");
insert_basic_type<int>("int");
insert_basic_type<double>("double");
}

template<typename T>
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<BasicType>(type, utils::get_type_name<T>());
registered_types[type] = utils::make_unique_ptr<BasicType>(type, name);
}

const FeatureType &TypeRegistry::create_feature_type(const CategoryPlugin &plugin) {
Expand Down
2 changes: 1 addition & 1 deletion src/search/plugins/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class TypeRegistry {
std::unordered_map<const Type *, std::unique_ptr<ListType>,
SemanticHash, SemanticEqual> registered_list_types;
template<typename T>
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;
Expand Down

0 comments on commit f0fbdcb

Please sign in to comment.