Code review comment for lp:~osomon/unity-2d/custom-quicklists-static

Revision history for this message
Olivier Tilloy (osomon) wrote :

> The use of a reverse for loop does not seem necessary. A forward one would be
> simpler. And even better would be to use a Q_FOREACH.

It *is* necessary because in this loop we are potentially removing the current action from the list, thus invalidating greater indexes. Iterating backward ensures the current index is always valid without having to resort to complex arithmetics.

« Back to merge proposal