Changeset View
Changeset View
Standalone View
Standalone View
src/lib/searchstore.cpp
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | |||||
155 | 155 | | |||
156 | } | 156 | } | ||
157 | 157 | | |||
158 | PostingIterator* SearchStore::constructQuery(Transaction* tr, const Term& term) | 158 | PostingIterator* SearchStore::constructQuery(Transaction* tr, const Term& term) | ||
159 | { | 159 | { | ||
160 | Q_ASSERT(tr); | 160 | Q_ASSERT(tr); | ||
161 | 161 | | |||
162 | if (term.operation() == Term::And || term.operation() == Term::Or) { | 162 | if (term.operation() == Term::And || term.operation() == Term::Or) { | ||
163 | QList<Term> subTerms = term.subTerms(); | 163 | const QList<Term> subTerms = term.subTerms(); | ||
bruns: `const QList<Term> subterms = ...` | |||||
164 | QVector<PostingIterator*> vec; | 164 | QVector<PostingIterator*> vec; | ||
165 | vec.reserve(subTerms.size()); | 165 | vec.reserve(subTerms.size()); | ||
166 | 166 | | |||
167 | for (const Term& t : term.subTerms()) { | 167 | for (const Term& t : subTerms) { | ||
bruns: No const here? | |||||
168 | vec << constructQuery(tr, t); | 168 | vec << constructQuery(tr, t); | ||
169 | } | 169 | } | ||
170 | 170 | | |||
171 | if (vec.isEmpty()) { | 171 | if (vec.isEmpty()) { | ||
172 | return nullptr; | 172 | return nullptr; | ||
173 | } | 173 | } | ||
174 | 174 | | |||
175 | if (term.operation() == Term::And) { | 175 | if (term.operation() == Term::And) { | ||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |
const QList<Term> subterms = ...