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/FeatureConfig.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/FeatureConfig.cc')
| -rw-r--r-- | src/FeatureConfig.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc index 35065528..66dfcf23 100644 --- a/src/FeatureConfig.cc +++ b/src/FeatureConfig.cc @@ -151,8 +151,8 @@ bool FeatureConfig::isSupported(const std::string& feature) const std::string FeatureConfig::featureSummary() const { std::string s; - for(FeatureMap::const_iterator i = _features.begin(); - i != _features.end(); ++i) { + for(FeatureMap::const_iterator i = _features.begin(), eoi = _features.end(); + i != eoi; ++i) { if((*i).second) { s += (*i).first; s += ", "; |
