regex: use a vector in RegexComponentSetMatcher
Change-Id: Iec466b477144a7332d2f1992691601c738dfc3df
Refs: #4120
diff --git a/src/util/regex/regex-component-set-matcher.cpp b/src/util/regex/regex-component-set-matcher.cpp
index 8e39794..bc922dd 100644
--- a/src/util/regex/regex-component-set-matcher.cpp
+++ b/src/util/regex/regex-component-set-matcher.cpp
@@ -68,8 +68,7 @@
if (m_expr.size() != end)
BOOST_THROW_EXCEPTION(Error("Component expr error " + m_expr));
- m_components.insert(make_shared<RegexComponentMatcher>(m_expr.substr(1, end - 2),
- m_backrefManager));
+ m_components.push_back(make_shared<RegexComponentMatcher>(m_expr.substr(1, end - 2), m_backrefManager));
}
void
@@ -84,8 +83,8 @@
tempIndex = index + 1;
index = extractComponent(tempIndex);
- m_components.insert(make_shared<RegexComponentMatcher>(m_expr.substr(tempIndex, index - tempIndex - 1),
- m_backrefManager));
+ m_components.push_back(make_shared<RegexComponentMatcher>(m_expr.substr(tempIndex, index - tempIndex - 1),
+ m_backrefManager));
}
if (index != lastIndex)
diff --git a/src/util/regex/regex-component-set-matcher.hpp b/src/util/regex/regex-component-set-matcher.hpp
index 3c9fae9..5cb9d1f 100644
--- a/src/util/regex/regex-component-set-matcher.hpp
+++ b/src/util/regex/regex-component-set-matcher.hpp
@@ -26,7 +26,7 @@
#include "regex-matcher.hpp"
-#include <set>
+#include <vector>
namespace ndn {
@@ -63,7 +63,7 @@
extractComponent(size_t index) const;
private:
- std::set<shared_ptr<RegexComponentMatcher>> m_components;
+ std::vector<shared_ptr<RegexComponentMatcher>> m_components;
bool m_isInclusion;
};