Skip to content

Commit

Permalink
Use reverse(iota)
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Oct 24, 2023
1 parent 1c87c33 commit 24b9d96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/fintamath/expressions/Expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ void Expression::fixOperatorTypes(TermVector &terms) {
}
}

// TODO: use reverse(iota(1, terms.size() - 1)) when it is work
for (size_t i = terms.size() - 2; i > 0; i--) {
for (auto i : std::views::reverse(std::views::iota(1U, terms.size()))) {
const auto &term = terms[i];
const auto &termNext = terms[i + 1];

Expand Down

0 comments on commit 24b9d96

Please sign in to comment.