diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-09 12:23:33 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-07-11 15:01:31 +0200 |
commit | 03a8a981f16543b555172a3d426feac858d96576 (patch) | |
tree | 72a947a66a31931db8e5d6a0674d43be5883a883 /src/hashcomp.cpp | |
parent | 655387286ab0517c9cdb905d67fad74f80cda241 (diff) |
Use std::set instead of std::map in irc::portparser
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 92de37e61..3a478bb20 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -486,7 +486,6 @@ std::string& irc::stringjoiner::GetJoined() irc::portparser::portparser(const std::string &source, bool allow_overlapped) : in_range(0), range_begin(0), range_end(0), overlapped(allow_overlapped) { sep = new irc::commasepstream(source); - overlap_set.clear(); } irc::portparser::~portparser() @@ -499,13 +498,7 @@ bool irc::portparser::Overlaps(long val) if (!overlapped) return false; - if (overlap_set.find(val) == overlap_set.end()) - { - overlap_set[val] = true; - return false; - } - else - return true; + return (!overlap_set.insert(val).second); } long irc::portparser::GetToken() |