summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-09 12:23:33 +0200
committerattilamolnar <attilamolnar@hush.com>2012-07-11 15:01:31 +0200
commit03a8a981f16543b555172a3d426feac858d96576 (patch)
tree72a947a66a31931db8e5d6a0674d43be5883a883 /src/hashcomp.cpp
parent655387286ab0517c9cdb905d67fad74f80cda241 (diff)
Use std::set instead of std::map in irc::portparser
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp9
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()