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/main.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/main.cc')
| -rw-r--r-- | src/main.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc index 7ad7e963..242dcaa5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -135,8 +135,8 @@ static void showFiles (const std::vector<std::string>& uris, const SharedHandle<Option>& op) { ProtocolDetector dt; - for(std::vector<std::string>::const_iterator i = uris.begin(); - i != uris.end(); ++i) { + for(std::vector<std::string>::const_iterator i = uris.begin(), + eoi = uris.end(); i != eoi; ++i) { printf(">>> "); printf(MSG_SHOW_FILES, (*i).c_str()); printf("\n"); |
