diff --git a/arangod/Aql/ExecutionBlock.cpp b/arangod/Aql/ExecutionBlock.cpp index b307018d70..a3ede088a5 100644 --- a/arangod/Aql/ExecutionBlock.cpp +++ b/arangod/Aql/ExecutionBlock.cpp @@ -1259,7 +1259,8 @@ bool IndexRangeBlock::initRanges () { _posInRanges = 0; getSkiplistIterator(_condition->at(_sortCoords[_posInRanges])); return (_skiplistIterator != nullptr); - } else { + } + else { return false; } } @@ -1281,12 +1282,13 @@ bool IndexRangeBlock::SortFunc::operator() (size_t const& i, size_t const& j) { if (! _reverse) { l = i; r = j; - } else { + } + else { l = j; r = i; } - size_t shortest = std::min(_prefix.at(i).size(), _prefix.at(j).size()); + size_t shortest = (std::min)(_prefix.at(i).size(), _prefix.at(j).size()); for (size_t k = 0; k < shortest; k++) { RangeInfo lhs = _condition->at(l).at(_prefix.at(l).at(k)); @@ -1299,14 +1301,16 @@ bool IndexRangeBlock::SortFunc::operator() (size_t const& i, size_t const& j) { if (cmp != 0) { return (cmp == -1); } - } else { + } + else { // assuming lhs and rhs are disjoint!! TRI_ASSERT_EXPENSIVE(areDisjointRangeInfos(lhs, rhs)); if (lhs._highConst.isDefined() && rhs._lowConst.isDefined()) { cmp = (TRI_CompareValuesJson(lhs._highConst.bound().json(), rhs._lowConst.bound().json())); return (cmp == 0 || cmp == -1); - } else { // lhs._lowConst.isDefined() && rhs._highConst.isDefined() + } + else { // lhs._lowConst.isDefined() && rhs._highConst.isDefined() return false; } } @@ -1983,7 +1987,8 @@ void IndexRangeBlock::readSkiplistIndex (size_t atMost) { if (++_posInRanges < _condition->size()) { getSkiplistIterator(_condition->at(_sortCoords[_posInRanges])); } - } else { + } + else { _documents.emplace_back(*(indexElement->_document)); ++nrSent; ++_engine->_stats.scannedIndex; diff --git a/arangod/Aql/OptimizerRules.cpp b/arangod/Aql/OptimizerRules.cpp index a0791a1def..b0b758b96f 100644 --- a/arangod/Aql/OptimizerRules.cpp +++ b/arangod/Aql/OptimizerRules.cpp @@ -878,7 +878,8 @@ class FilterToEnumCollFinder : public WalkerWorker { // there is an implicit AND between FILTER statements if (_rangeInfoMapVec == nullptr) { _rangeInfoMapVec = buildRangeInfo(node->expression()->node(), enumCollVar, attr); - } else { + } + else { _rangeInfoMapVec = andCombineRangeInfoMapVecs(_rangeInfoMapVec, buildRangeInfo(node->expression()->node(), enumCollVar, attr)); } @@ -1361,7 +1362,8 @@ class FilterToEnumCollFinder : public WalkerWorker { rimv->emplace_back(new RangeInfoMap(ri)); } } - } else { + } + else { RangeInfo ri(enumCollVar->name, attr.substr(0, attr.size() - 1), RangeInfoBound(rhs, true), diff --git a/arangod/Aql/RangeInfo.cpp b/arangod/Aql/RangeInfo.cpp index c391066726..24e834d207 100644 --- a/arangod/Aql/RangeInfo.cpp +++ b/arangod/Aql/RangeInfo.cpp @@ -586,7 +586,8 @@ RangeInfoMapVec* triagens::aql::orCombineRangeInfoMapVecs (RangeInfoMapVec* lhs, } if (! rim->empty()) { lhs->emplace_back(rim); - } else { + } + else { delete rim; } } @@ -756,7 +757,8 @@ void triagens::aql::differenceRangeInfos (RangeInfo& lhs, RangeInfo& rhs) { // unassign _lowConst and _highConst if (lhs.isConstant()) { lhs.invalidate(); - } else { + } + else { RangeInfoBound rib; lhs._lowConst.assign(rib); lhs._highConst.assign(rib); @@ -767,7 +769,8 @@ void triagens::aql::differenceRangeInfos (RangeInfo& lhs, RangeInfo& rhs) { // unassign _lowConst and _highConst if (rhs.isConstant()) { rhs.invalidate(); - } else { + } + else { RangeInfoBound rib; rhs._lowConst.assign(rib); rhs._highConst.assign(rib); @@ -909,7 +912,8 @@ void triagens::aql::removeOverlapsIndexOr (IndexOrCondition& ioc) { for (auto it = ioc.begin(); it < ioc.end(); ) { if (it->empty()) { it = ioc.erase(it); - } else { + } + else { it++; } }