Skip to content

Commit 8eb0967

Browse files
fixup
1 parent 1341e19 commit 8eb0967

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

tesseract_common/include/tesseract_common/property_tree.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ namespace tesseract_common
1414
namespace property_type
1515
{
1616
/**
17-
* @brief A utility for constructing the list type
17+
* @brief A utility for constructing the std::vector<type>
1818
* @param type The type assoicated with the list
1919
* @return The string representation of the std::vector<type>, aka. type[]
2020
*/
2121
std::string createList(std::string_view type);
2222

2323
/**
24-
* @brief A utility for constructing the map type
25-
* @param key_type The type assoicated with the map key
26-
* @param value_type The type assoicated with the map value
27-
* @return The string representation of the std::make<key_type, value_type>, aka. {key_type : value_type}
24+
* @brief A utility for constructing the std::map<std::string, type>
25+
* @param type The value type assoicated with the map
26+
* @return The string representation of the std::map<std::string, type>, aka. type{}
2827
*/
29-
std::string createMap(std::string_view key_type, std::string_view value_type);
28+
std::string createMap(std::string_view type);
3029

3130
// Integral Types
3231
constexpr std::string_view BOOL{ "bool" };

tesseract_common/src/property_tree.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ namespace tesseract_common
1313
namespace property_type
1414
{
1515
std::string createList(std::string_view type) { return std::string(type) + "[]"; };
16-
std::string createMap(std::string_view key_type, std::string_view value_type)
17-
{
18-
return "{" + std::string(key_type) + " : " + std::string(value_type) + "}";
19-
};
16+
std::string createMap(std::string_view type) { return std::string(type) + "{}"; };
2017
} // namespace property_type
2118

2219
void PropertyTree::mergeConfig(const YAML::Node& config, bool allow_extra_properties)

tesseract_common/src/property_tree_demo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ tesseract_common::PropertyTree getTaskComposerRasterOnlySchema()
258258
}
259259
{
260260
auto& prop = raster_config.get("remapping");
261-
prop.setAttribute(property_attribute::TYPE,
262-
property_type::createMap(property_type::STRING, property_type::STRING));
261+
prop.setAttribute(property_attribute::TYPE, property_type::createMap(property_type::STRING));
263262
prop.setAttribute(property_attribute::DOC, "The remapping of input and output keys");
264263
}
265264
{
@@ -291,8 +290,7 @@ tesseract_common::PropertyTree getTaskComposerRasterOnlySchema()
291290
}
292291
{
293292
auto& prop = transition_config.get("remapping");
294-
prop.setAttribute(property_attribute::TYPE,
295-
property_type::createMap(property_type::STRING, property_type::STRING));
293+
prop.setAttribute(property_attribute::TYPE, property_type::createMap(property_type::STRING));
296294
prop.setAttribute(property_attribute::DOC, "The remapping of input and output keys");
297295
}
298296
{

0 commit comments

Comments
 (0)