This commit is contained in:
Andrey Mironov 2014-10-02 22:34:49 +04:00
parent 59ae69c5e9
commit 9800d0d95f
2 changed files with 3 additions and 3 deletions

View File

@ -86,8 +86,8 @@ private:
/// remove condition by swapping it with the last one and calling ::pop_back()
const auto remove_condition_at_index = [&conditions] (const std::size_t idx) {
if (idx < conditions.size())
conditions[idx] = std::move(conditions.back());
if (idx < conditions.size() - 1)
std::swap(conditions[idx], conditions.back());
conditions.pop_back();
};

View File

@ -459,7 +459,7 @@ void ExpressionAnalyzer::optimizeGroupBy()
const auto remove_expr_at_index = [&group_exprs] (const size_t idx)
{
if (idx < group_exprs.size() - 1)
group_exprs[idx] = std::move(group_exprs.back());
std::swap(group_exprs[idx], group_exprs.back());
group_exprs.pop_back();
};