summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/TagKeeper.cpp9
-rw-r--r--src/helpers/TagKeeper.hpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/helpers/TagKeeper.cpp b/src/helpers/TagKeeper.cpp
index 7f377657..80bf3957 100644
--- a/src/helpers/TagKeeper.cpp
+++ b/src/helpers/TagKeeper.cpp
@@ -38,6 +38,15 @@ bool CTagKeeper::applyTag(const std::string& tag, bool dynamic) {
return true;
}
+bool CTagKeeper::clearTags() {
+ if (!m_tags.empty()) {
+ m_tags.clear();
+ return true;
+ }
+
+ return false;
+}
+
bool CTagKeeper::removeDynamicTag(const std::string& s) {
return std::erase_if(m_tags, [&s](const auto& tag) { return tag == s + "*"; });
}
diff --git a/src/helpers/TagKeeper.hpp b/src/helpers/TagKeeper.hpp
index d18a0d29..f90b0629 100644
--- a/src/helpers/TagKeeper.hpp
+++ b/src/helpers/TagKeeper.hpp
@@ -8,6 +8,7 @@ class CTagKeeper {
bool isTagged(const std::string& tag, bool strict = false) const;
bool applyTag(const std::string& tag, bool dynamic = false);
bool removeDynamicTag(const std::string& tag);
+ bool clearTags();
const auto& getTags() const {
return m_tags;