summaryrefslogtreecommitdiffstats
path: root/components/url_matcher
diff options
context:
space:
mode:
Diffstat (limited to 'components/url_matcher')
-rw-r--r--components/url_matcher/string_pattern.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/url_matcher/string_pattern.cc b/components/url_matcher/string_pattern.cc
index d103bce..a4b87bc 100644
--- a/components/url_matcher/string_pattern.cc
+++ b/components/url_matcher/string_pattern.cc
@@ -4,6 +4,8 @@
#include "components/url_matcher/string_pattern.h"
+#include <tuple>
+
namespace url_matcher {
StringPattern::StringPattern(const std::string& pattern,
@@ -13,8 +15,7 @@ StringPattern::StringPattern(const std::string& pattern,
StringPattern::~StringPattern() {}
bool StringPattern::operator<(const StringPattern& rhs) const {
- if (id_ != rhs.id_) return id_ < rhs.id_;
- return pattern_ < rhs.pattern_;
+ return std::tie(id_, pattern_) < std::tie(rhs.id_, rhs.pattern_);
}
} // namespace url_matcher