diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-09-23 19:03:34 +0300 |
---|---|---|
committer | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-09-23 19:03:34 +0300 |
commit | 35bac07d87abe4ef4216008bf4b1d4e2867b8524 (patch) | |
tree | fdd68dee4791570f40633988910efea4f7b66c04 /indexer/classificator.cpp | |
parent | b29c52d807cf510e1e111f3ec866f2d1c54962d8 (diff) |
Fixed notes
Diffstat (limited to 'indexer/classificator.cpp')
-rw-r--r-- | indexer/classificator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp index fff10dcd0b..f66acc8589 100644 --- a/indexer/classificator.cpp +++ b/indexer/classificator.cpp @@ -47,11 +47,10 @@ ClassifObject * ClassifObject::Find(string const & s) void ClassifObject::AddDrawRule(drule::Key const & k) { - for (size_t i = 0; i < m_drawRule.size(); ++i) - if (k == m_drawRule[i]) - return; - auto i = lower_bound(m_drawRule.begin(), m_drawRule.end(), k.m_scale, less_scales()); + for (; i != m_drawRule.end() && i->m_scale == k.m_scale; ++i) + if (k == *i) + return; // already exists m_drawRule.insert(i, k); } |