Use reverse iterator.
This commit is contained in:
parent
9baaec35d5
commit
9d040e6081
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue