| 160 | |
| 161 | |
| 162 | void SymbolRuleSet::sortByQueryKeyAndValue() |
| 163 | { |
| 164 | auto last = std::remove_if(begin(), end(), [](auto item) { |
| 165 | const auto op = item.query.getOperator(); |
| 166 | return (op != ObjectQuery::OperatorIs |
| 167 | && op != ObjectQuery::OperatorIsNot |
| 168 | && op != ObjectQuery::OperatorContains) |
| 169 | || !item.query.tagOperands(); |
| 170 | }); |
| 171 | std::sort(begin(), last, [](auto lhs, auto rhs) { |
| 172 | auto lhs_op = lhs.query.tagOperands(); |
| 173 | auto rhs_op = rhs.query.tagOperands(); |
| 174 | return (lhs_op->key < rhs_op->key) |
| 175 | && (lhs_op->value < rhs_op->value); |
| 176 | }); |
| 177 | } |
| 178 | |
| 179 | |
| 180 |
no test coverage detected