@@ -807,7 +807,7 @@ namespace Sass {
807
807
return ns () < rhs.ns ();
808
808
}
809
809
810
- bool Wrapped_Selector::is_superselector_of (Wrapped_Selector_Obj sub) const
810
+ bool Wrapped_Selector::is_superselector_of (Wrapped_Selector_Ptr_Const sub) const
811
811
{
812
812
if (this ->name () != sub->name ()) return false ;
813
813
if (this ->name () == " :current" ) return false ;
@@ -820,21 +820,21 @@ namespace Sass {
820
820
return false ;
821
821
}
822
822
823
- bool Compound_Selector::is_superselector_of (Selector_List_Obj rhs, std::string wrapped) const
823
+ bool Compound_Selector::is_superselector_of (Selector_List_Ptr_Const rhs, std::string wrapped) const
824
824
{
825
825
for (Complex_Selector_Obj item : rhs->elements ()) {
826
826
if (is_superselector_of (item, wrapped)) return true ;
827
827
}
828
828
return false ;
829
829
}
830
830
831
- bool Compound_Selector::is_superselector_of (Complex_Selector_Obj rhs, std::string wrapped) const
831
+ bool Compound_Selector::is_superselector_of (Complex_Selector_Ptr_Const rhs, std::string wrapped) const
832
832
{
833
833
if (rhs->head ()) return is_superselector_of (rhs->head (), wrapped);
834
834
return false ;
835
835
}
836
836
837
- bool Compound_Selector::is_superselector_of (Compound_Selector_Obj rhs, std::string wrapping) const
837
+ bool Compound_Selector::is_superselector_of (Compound_Selector_Ptr_Const rhs, std::string wrapping) const
838
838
{
839
839
Compound_Selector_Ptr_Const lhs = this ;
840
840
Simple_Selector_Ptr lbase = lhs->base ();
@@ -895,7 +895,7 @@ namespace Sass {
895
895
if (wrapped->name () == " :matches" || wrapped->name () == " :-moz-any" ) {
896
896
wlhs = wrapped->selector ();
897
897
if (Selector_List_Obj list = Cast<Selector_List>(wrapped->selector ())) {
898
- if (Compound_Selector_Obj comp = Cast<Compound_Selector>(rhs)) {
898
+ if (Compound_Selector_Ptr_Const comp = Cast<Compound_Selector>(rhs)) {
899
899
if (!wrapping.empty () && wrapping != wrapped->name ()) return false ;
900
900
if (wrapping.empty () || wrapping != wrapped->name ()) {;
901
901
if (list->is_superselector_of (comp, wrapped->name ())) return true ;
@@ -956,7 +956,7 @@ namespace Sass {
956
956
pstate (),
957
957
Complex_Selector::ANCESTOR_OF,
958
958
this ,
959
- 0 );
959
+ {} );
960
960
}
961
961
962
962
Selector_List_Ptr Complex_Selector::unify_with (Complex_Selector_Ptr other)
@@ -997,7 +997,7 @@ namespace Sass {
997
997
if (is_universal)
998
998
{
999
999
// move the head
1000
- l_last->head (0 );
1000
+ l_last->head ({} );
1001
1001
r_last->head (unified);
1002
1002
}
1003
1003
@@ -1059,12 +1059,12 @@ namespace Sass {
1059
1059
// there is no break?!
1060
1060
}
1061
1061
1062
- bool Complex_Selector::is_superselector_of (Compound_Selector_Obj rhs, std::string wrapping) const
1062
+ bool Complex_Selector::is_superselector_of (Compound_Selector_Ptr_Const rhs, std::string wrapping) const
1063
1063
{
1064
1064
return last ()->head () && last ()->head ()->is_superselector_of (rhs, wrapping);
1065
1065
}
1066
1066
1067
- bool Complex_Selector::is_superselector_of (Complex_Selector_Obj rhs, std::string wrapping) const
1067
+ bool Complex_Selector::is_superselector_of (Complex_Selector_Ptr_Const rhs, std::string wrapping) const
1068
1068
{
1069
1069
Complex_Selector_Ptr_Const lhs = this ;
1070
1070
// check for selectors with leading or trailing combinators
@@ -1098,7 +1098,7 @@ namespace Sass {
1098
1098
}
1099
1099
1100
1100
bool found = false ;
1101
- Complex_Selector_Obj marker = rhs;
1101
+ Complex_Selector_Ptr_Const marker = rhs;
1102
1102
for (size_t i = 0 , L = rhs->length (); i < L; ++i) {
1103
1103
if (i == L-1 )
1104
1104
{ return false ; }
@@ -1297,7 +1297,7 @@ namespace Sass {
1297
1297
h->erase (h->begin ());
1298
1298
ss->head (h);
1299
1299
} else {
1300
- ss->head (NULL );
1300
+ ss->head ({} );
1301
1301
}
1302
1302
// adjust for parent selector (1 char)
1303
1303
// if (h->length()) {
@@ -1334,7 +1334,7 @@ namespace Sass {
1334
1334
h->erase (h->begin ());
1335
1335
ss->head (h);
1336
1336
} else {
1337
- ss->head (NULL );
1337
+ ss->head ({} );
1338
1338
}
1339
1339
// \/ IMO ruby sass bug \/
1340
1340
ss->has_line_feed (false );
@@ -1362,7 +1362,7 @@ namespace Sass {
1362
1362
cpy->head (SASS_MEMORY_NEW (Compound_Selector, head->pstate ()));
1363
1363
for (size_t i = 1 , L = this ->head ()->length (); i < L; ++i)
1364
1364
cpy->head ()->append ((*this ->head ())[i]);
1365
- if (!cpy->head ()->length ()) cpy->head (0 );
1365
+ if (!cpy->head ()->length ()) cpy->head ({} );
1366
1366
retval->append (cpy->skip_empty_reference ());
1367
1367
}
1368
1368
}
@@ -1372,7 +1372,7 @@ namespace Sass {
1372
1372
cpy->head (SASS_MEMORY_NEW (Compound_Selector, head->pstate ()));
1373
1373
for (size_t i = 1 , L = this ->head ()->length (); i < L; ++i)
1374
1374
cpy->head ()->append ((*this ->head ())[i]);
1375
- if (!cpy->head ()->length ()) cpy->head (0 );
1375
+ if (!cpy->head ()->length ()) cpy->head ({} );
1376
1376
retval->append (cpy->skip_empty_reference ());
1377
1377
}
1378
1378
}
@@ -1461,8 +1461,8 @@ namespace Sass {
1461
1461
Complex_Selector::Combinator Complex_Selector::clear_innermost ()
1462
1462
{
1463
1463
Combinator c;
1464
- if (!tail () || tail ()->tail () == 0 )
1465
- { c = combinator (); combinator (ANCESTOR_OF); tail (0 ); }
1464
+ if (!tail () || tail ()->tail () == nullptr )
1465
+ { c = combinator (); combinator (ANCESTOR_OF); tail ({} ); }
1466
1466
else
1467
1467
{ c = tail_->clear_innermost (); }
1468
1468
return c;
@@ -1590,7 +1590,7 @@ namespace Sass {
1590
1590
1591
1591
// it's a superselector if every selector of the right side
1592
1592
// list is a superselector of the given left side selector
1593
- bool Complex_Selector::is_superselector_of (Selector_List_Obj sub, std::string wrapping) const
1593
+ bool Complex_Selector::is_superselector_of (Selector_List_Ptr_Const sub, std::string wrapping) const
1594
1594
{
1595
1595
// Check every rhs selector against left hand list
1596
1596
for (size_t i = 0 , L = sub->length (); i < L; ++i) {
@@ -1601,7 +1601,7 @@ namespace Sass {
1601
1601
1602
1602
// it's a superselector if every selector of the right side
1603
1603
// list is a superselector of the given left side selector
1604
- bool Selector_List::is_superselector_of (Selector_List_Obj sub, std::string wrapping) const
1604
+ bool Selector_List::is_superselector_of (Selector_List_Ptr_Const sub, std::string wrapping) const
1605
1605
{
1606
1606
// Check every rhs selector against left hand list
1607
1607
for (size_t i = 0 , L = sub->length (); i < L; ++i) {
@@ -1612,7 +1612,7 @@ namespace Sass {
1612
1612
1613
1613
// it's a superselector if every selector on the right side
1614
1614
// is a superselector of any one of the left side selectors
1615
- bool Selector_List::is_superselector_of (Compound_Selector_Obj sub, std::string wrapping) const
1615
+ bool Selector_List::is_superselector_of (Compound_Selector_Ptr_Const sub, std::string wrapping) const
1616
1616
{
1617
1617
// Check every lhs selector against right hand
1618
1618
for (size_t i = 0 , L = length (); i < L; ++i) {
@@ -1623,7 +1623,7 @@ namespace Sass {
1623
1623
1624
1624
// it's a superselector if every selector on the right side
1625
1625
// is a superselector of any one of the left side selectors
1626
- bool Selector_List::is_superselector_of (Complex_Selector_Obj sub, std::string wrapping) const
1626
+ bool Selector_List::is_superselector_of (Complex_Selector_Ptr_Const sub, std::string wrapping) const
1627
1627
{
1628
1628
// Check every lhs selector against right hand
1629
1629
for (size_t i = 0 , L = length (); i < L; ++i) {
@@ -1736,7 +1736,7 @@ namespace Sass {
1736
1736
}
1737
1737
}
1738
1738
}
1739
- return NULL ;
1739
+ return {} ;
1740
1740
}
1741
1741
1742
1742
Argument_Obj Arguments::get_keyword_argument ()
@@ -1748,7 +1748,7 @@ namespace Sass {
1748
1748
}
1749
1749
}
1750
1750
}
1751
- return NULL ;
1751
+ return {} ;
1752
1752
}
1753
1753
1754
1754
void Arguments::adjust_after_pushing (Argument_Obj a)
@@ -2034,7 +2034,7 @@ namespace Sass {
2034
2034
{
2035
2035
if (elements_.count (k))
2036
2036
{ return elements_.at (k); }
2037
- else { return NULL ; }
2037
+ else { return {} ; }
2038
2038
}
2039
2039
2040
2040
bool Binary_Expression::is_left_interpolant (void ) const
@@ -2096,7 +2096,7 @@ namespace Sass {
2096
2096
}
2097
2097
2098
2098
Function_Call::Function_Call (ParserState pstate, std::string n, Arguments_Obj args, void * cookie)
2099
- : PreValue(pstate), sname_(SASS_MEMORY_NEW(String_Constant, pstate, n)), arguments_(args), func_(0 ), via_call_(false ), cookie_(cookie), hash_(0 )
2099
+ : PreValue(pstate), sname_(SASS_MEMORY_NEW(String_Constant, pstate, n)), arguments_(args), func_(), via_call_(false ), cookie_(cookie), hash_(0 )
2100
2100
{ concrete_type (FUNCTION); }
2101
2101
Function_Call::Function_Call (ParserState pstate, std::string n, Arguments_Obj args, Function_Obj func)
2102
2102
: PreValue(pstate), sname_(SASS_MEMORY_NEW(String_Constant, pstate, n)), arguments_(args), func_(func), via_call_(false ), cookie_(0 ), hash_(0 )
0 commit comments