1
0
Fork 0

indentation

This commit is contained in:
Jan Steemann 2014-12-16 00:30:55 +01:00
parent 1a57d587e0
commit 4a60a62028
3 changed files with 23 additions and 12 deletions

View File

@ -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;

View File

@ -878,7 +878,8 @@ class FilterToEnumCollFinder : public WalkerWorker<ExecutionNode> {
// 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<ExecutionNode> {
rimv->emplace_back(new RangeInfoMap(ri));
}
}
} else {
}
else {
RangeInfo ri(enumCollVar->name,
attr.substr(0, attr.size() - 1),
RangeInfoBound(rhs, true),

View File

@ -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++;
}
}