Skip to content

Commit

Permalink
Add clear method to profile dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 21, 2023
1 parent d8a0816 commit 15266d3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ class ProfileDictionary
.erase(profile_name);
}

/** @brief Clear the dictionary */
void clear()
{
std::unique_lock lock(mutex_);
profiles_.clear();
}

protected:
std::unordered_map<std::string, std::unordered_map<std::type_index, std::any>> profiles_;
mutable std::shared_mutex mutex_;
Expand Down

0 comments on commit 15266d3

Please sign in to comment.