Skip to content

Commit 15266d3

Browse files
Add clear method to profile dictionary
1 parent d8a0816 commit 15266d3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tesseract_command_language/include/tesseract_command_language/profile_dictionary.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ class ProfileDictionary
215215
.erase(profile_name);
216216
}
217217

218+
/** @brief Clear the dictionary */
219+
void clear()
220+
{
221+
std::unique_lock lock(mutex_);
222+
profiles_.clear();
223+
}
224+
218225
protected:
219226
std::unordered_map<std::string, std::unordered_map<std::type_index, std::any>> profiles_;
220227
mutable std::shared_mutex mutex_;

0 commit comments

Comments
 (0)