File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -14,19 +14,18 @@ namespace tesseract_common
1414namespace 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 */
2121std::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
3231constexpr std::string_view BOOL{ " bool" };
Original file line number Diff line number Diff line change @@ -13,10 +13,7 @@ namespace tesseract_common
1313namespace property_type
1414{
1515std::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
2219void PropertyTree::mergeConfig (const YAML::Node& config, bool allow_extra_properties)
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments