diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-02-28 16:04:52 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-02-28 16:04:52 +0000 |
| commit | 72e475dfdeaa4a87dff0eef994e7814e94c40363 (patch) | |
| tree | 94a84e90c14876db223e4a733f651fe0b034f5e9 /src/HttpHeader.cc | |
| parent | c342bde9627b434effbc0cd10b817670d1da0923 (diff) | |
2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Avoid to calculate end() iterator in each loop. std::deque is
particularly slow. Make sure that recalculate end iterator if
element is erased during loop.
Diffstat (limited to 'src/HttpHeader.cc')
| -rw-r--r-- | src/HttpHeader.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index f103f5e3..88de932d 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -96,7 +96,8 @@ bool HttpHeader::defined(const std::string& name) const { } const std::string& HttpHeader::getFirst(const std::string& name) const { - std::multimap<std::string, std::string>::const_iterator itr = table.find(util::toLower(name)); + std::multimap<std::string, std::string>::const_iterator itr = + table.find(util::toLower(name)); if(itr == table.end()) { return A2STR::NIL; } else { |
