Use reverse iterator.
This commit is contained in:
parent
9baaec35d5
commit
9d040e6081
|
@ -408,10 +408,7 @@ void OperationStack::push(Operation* o)
|
||||||
{
|
{
|
||||||
Q_ASSERT(o);
|
Q_ASSERT(o);
|
||||||
|
|
||||||
auto currentOp = operations().end();
|
for (auto currentOp = operations().rbegin(); currentOp != operations().rend(); ++currentOp) {
|
||||||
while (currentOp != operations().begin())
|
|
||||||
{
|
|
||||||
--currentOp;
|
|
||||||
if (mergeNewOperation(*currentOp, o))
|
if (mergeNewOperation(*currentOp, o))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue