Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Fix trim loop condition and outer continue
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Oct 20, 2019
1 parent 1ec3876 commit fdf63e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/extender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1070,10 +1070,10 @@ namespace Sass {
// the result so that, if two selectors are identical, we keep the first one.
std::vector<ComplexSelectorObj> result; size_t numOriginals = 0;

// Use label to quit outer loop
redo:
size_t i = selectors.size();
outer: // Use label to continue loop
while (--i != std::string::npos) {

for (size_t i = selectors.size() - 1; i != std::string::npos; i--) {
const ComplexSelectorObj& complex1 = selectors[i];
// Check if selector in known in existing "originals"
// For custom behavior dart-sass had `isOriginal(complex1)`
Expand All @@ -1083,7 +1083,7 @@ namespace Sass {
for (size_t j = 0; j < numOriginals; j++) {
if (ObjEqualityFn(result[j], complex1)) {
rotateSlice(result, 0, j + 1);
goto redo;
goto outer;
}
}
result.insert(result.begin(), complex1);
Expand Down

0 comments on commit fdf63e4

Please sign in to comment.