Skip to content

Commit 5196b3b

Browse files
committed
Remove obsolete checks in selector methods
We should not encounter empty ancestors and we seem to have it under control now. Leave the checks in for debug mode.
1 parent 4b31249 commit 5196b3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ast.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ namespace Sass {
166166
// process all tails
167167
while (true)
168168
{
169+
#ifdef DEBUG
169170
// skip empty ancestor first
170171
if (l && l->is_empty_ancestor())
171172
{
@@ -182,6 +183,7 @@ namespace Sass {
182183
if (r) r_h = r->head();
183184
continue;
184185
}
186+
#endif
185187
// check for valid selectors
186188
if (!l) return !!r;
187189
if (!r) return false;
@@ -234,6 +236,7 @@ namespace Sass {
234236
// process all tails
235237
while (true)
236238
{
239+
#ifdef DEBUG
237240
// skip empty ancestor first
238241
if (l && l->is_empty_ancestor())
239242
{
@@ -250,6 +253,7 @@ namespace Sass {
250253
if (r) r_h = r->head();
251254
continue;
252255
}
256+
#endif
253257
// check the pointers
254258
if (!r) return !l;
255259
if (!l) return !r;

0 commit comments

Comments
 (0)