diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-03-23 01:34:37 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-03-23 01:34:37 +0900 |
| commit | eed804baaa02b4f81a27ba2844868b19992a90a1 (patch) | |
| tree | f6c5741443a979593fe080422ac78ef1b0f699d2 /src/Event.h | |
| parent | 4acc0f88317287b86c6b89ba5e5262d3ebd30cc9 (diff) | |
Use std::set instead of std::deque if the elements are sorted and
insertions and deletions are frequent.
Diffstat (limited to 'src/Event.h')
| -rw-r--r-- | src/Event.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Event.h b/src/Event.h index ce10c332..b538c47e 100644 --- a/src/Event.h +++ b/src/Event.h @@ -327,6 +327,13 @@ public: command_ == entry.command_; } + bool operator<(const AsyncNameResolverEntry& entry) + { + return nameResolver_.get() < entry.nameResolver_.get() || + (nameResolver_.get() == entry.nameResolver_.get() && + command_ < entry.command_); + } + void addSocketEvents(EventPoll* e) { socketsSize_ = 0; |
