diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-01-10 19:40:00 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-01-10 19:40:00 +0100 |
commit | 8030e0801d7e26cb9a8f2c5f475a82c99370e87f (patch) | |
tree | b22dbbb8c1a1e69438089b49355f74ec593258f4 /searchlib | |
parent | 080cab605506b08501214385f674e9bc594ff57d (diff) |
Use c++11 for loops and alignment.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/aggregation/grouping.cpp | 10 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/aggregation/grouping.h | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/searchlib/src/vespa/searchlib/aggregation/grouping.cpp b/searchlib/src/vespa/searchlib/aggregation/grouping.cpp index cac39f43666..5c93fb4161c 100644 --- a/searchlib/src/vespa/searchlib/aggregation/grouping.cpp +++ b/searchlib/src/vespa/searchlib/aggregation/grouping.cpp @@ -129,8 +129,8 @@ void Grouping::selectMembers(const vespalib::ObjectPredicate &predicate, vespalib::ObjectOperation &operation) { - for (size_t i(0), m(_levels.size()); i < m; i++) { - _levels[i].select(predicate, operation); + for (GroupingLevel & level : _levels) { + level.select(predicate, operation); } selectGroups(predicate, operation, _root, _firstLevel, _lastLevel, 0); } @@ -317,9 +317,9 @@ void Grouping::cleanupAttributeReferences() void Grouping::cleanTemporary() { - for (GroupingLevelList::iterator it(_levels.begin()), mt(_levels.end()); it != mt; ++it) { - if (it->getExpression().getRoot()->inherits(FunctionNode::classId)) { - static_cast<FunctionNode &>(*it->getExpression().getRoot()).reset(); + for (GroupingLevel & level : _levels) { + if (level.getExpression().getRoot()->inherits(FunctionNode::classId)) { + static_cast<FunctionNode &>(*level.getExpression().getRoot()).reset(); } } } diff --git a/searchlib/src/vespa/searchlib/aggregation/grouping.h b/searchlib/src/vespa/searchlib/aggregation/grouping.h index 74defb6035f..c84259578bc 100644 --- a/searchlib/src/vespa/searchlib/aggregation/grouping.h +++ b/searchlib/src/vespa/searchlib/aggregation/grouping.h @@ -22,14 +22,14 @@ public: typedef std::unique_ptr<Grouping> UP; private: - uint32_t _id; // client id for this grouping - bool _valid; // is this grouping object valid? - bool _all; // if true, group all document, not just hits (streaming only) - int64_t _topN; // hits to process per search node - uint32_t _firstLevel; // first processing level this iteration (levels before considered frozen) - uint32_t _lastLevel; // last processing level this iteration - GroupingLevelList _levels; // grouping parameters per level - Group _root; // the grouping tree + uint32_t _id; // client id for this grouping + bool _valid; // is this grouping object valid? + bool _all; // if true, group all document, not just hits (streaming only) + int64_t _topN; // hits to process per search node + uint32_t _firstLevel; // first processing level this iteration (levels before considered frozen) + uint32_t _lastLevel; // last processing level this iteration + GroupingLevelList _levels; // grouping parameters per level + Group _root; // the grouping tree const vespalib::Clock *_clock; // An optional clock to be used for timeout handling. fastos::TimeStamp _timeOfDoom; // Used if clock is specified. This is time when request expires. |