Use reverse iterator.

This commit is contained in:
Andrius Štikonas 2016-07-08 00:57:16 +01:00
parent 9baaec35d5
commit 9d040e6081
1 changed files with 1 additions and 4 deletions

View File

@ -408,10 +408,7 @@ void OperationStack::push(Operation* o)
{
Q_ASSERT(o);
auto currentOp = operations().end();
while (currentOp != operations().begin())
{
--currentOp;
for (auto currentOp = operations().rbegin(); currentOp != operations().rend(); ++currentOp) {
if (mergeNewOperation(*currentOp, o))
break;