File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed
include/behaviortree_cpp_v3 Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,9 @@ elseif(BUILD_UNIT_TESTS)
105
105
find_package (GTest )
106
106
107
107
if (NOT GTEST_FOUND )
108
- message (WARNING " GTest missing!" )
109
- endif (NOT GTEST_FOUND )
108
+ message (WARNING " GTest missing! You may want to follow these instructions:" )
109
+ message (WARNING " https://gist.github.com/Cartexius/4c437c084d6e388288201aadf9c8cdd5" )
110
+ endif ()
110
111
111
112
endif ()
112
113
Original file line number Diff line number Diff line change @@ -183,10 +183,12 @@ class Blackboard
183
183
184
184
const PortInfo *portInfo (const std::string& key);
185
185
186
- void addSubtreeRemapping (std::string internal, std::string external);
186
+ void addSubtreeRemapping (StringView internal, StringView external);
187
187
188
188
void debugMessage () const ;
189
189
190
+ std::vector<StringView> getKeys () const ;
191
+
190
192
private:
191
193
192
194
struct Entry {
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ const PortInfo* Blackboard::portInfo(const std::string &key)
42
42
return &(it->second .port_info );
43
43
}
44
44
45
- void Blackboard::addSubtreeRemapping (std::string internal, std::string external)
45
+ void Blackboard::addSubtreeRemapping (StringView internal, StringView external)
46
46
{
47
- internal_to_external_.insert ( {std::move ( internal), std::move ( external)} );
47
+ internal_to_external_.insert ( {internal. to_string ( ), external. to_string ( )} );
48
48
}
49
49
50
50
void Blackboard::debugMessage () const
@@ -72,4 +72,15 @@ void Blackboard::debugMessage() const
72
72
}
73
73
}
74
74
75
+ std::vector<StringView> Blackboard::getKeys () const
76
+ {
77
+ std::vector<StringView> out;
78
+ out.reserve ( storage_.size () );
79
+ for (const auto & entry_it: storage_)
80
+ {
81
+ out.push_back ( entry_it.first );
82
+ }
83
+ return out;
84
+ }
85
+
75
86
}
You can’t perform that action at this time.
0 commit comments