@@ -348,10 +348,10 @@ namespace Sass {
348348
349349 bool Complex_Selector::operator == (const Selector& rhs) const
350350 {
351- if (const Selector_List* sl = Cast<Selector_List>(&rhs)) return this -> eq ( *sl) ;
352- if (const Simple_Selector* sp = Cast<Simple_Selector>(&rhs)) return this -> eq ( *sp) ;
353- if (const Complex_Selector* cs = Cast<Complex_Selector>(&rhs)) return this -> eq ( *cs) ;
354- if (const Compound_Selector* ch = Cast<Compound_Selector>(&rhs)) return this -> eq ( *ch) ;
351+ if (const Selector_List* sl = Cast<Selector_List>(&rhs)) return * this == *sl;
352+ if (const Simple_Selector* sp = Cast<Simple_Selector>(&rhs)) return * this == *sp;
353+ if (const Complex_Selector* cs = Cast<Complex_Selector>(&rhs)) return * this == *cs;
354+ if (const Compound_Selector* ch = Cast<Compound_Selector>(&rhs)) return * this == *ch;
355355 throw std::runtime_error (" invalid selector base classes to compare" );
356356 }
357357
@@ -367,10 +367,10 @@ namespace Sass {
367367
368368 bool Compound_Selector::operator == (const Selector& rhs) const
369369 {
370- if (const Selector_List* sl = Cast<Selector_List>(&rhs)) return this -> eq ( *sl) ;
371- if (const Simple_Selector* sp = Cast<Simple_Selector>(&rhs)) return this -> eq ( *sp) ;
372- if (const Complex_Selector* cs = Cast<Complex_Selector>(&rhs)) return this -> eq ( *cs) ;
373- if (const Compound_Selector* ch = Cast<Compound_Selector>(&rhs)) return this -> eq ( *ch) ;
370+ if (const Selector_List* sl = Cast<Selector_List>(&rhs)) return * this == *sl;
371+ if (const Simple_Selector* sp = Cast<Simple_Selector>(&rhs)) return * this == *sp;
372+ if (const Complex_Selector* cs = Cast<Complex_Selector>(&rhs)) return * this == *cs;
373+ if (const Compound_Selector* ch = Cast<Compound_Selector>(&rhs)) return * this == *ch;
374374 throw std::runtime_error (" invalid selector base classes to compare" );
375375 }
376376
@@ -440,9 +440,9 @@ namespace Sass {
440440 bool Selector_List::operator == (const Selector& rhs) const
441441 {
442442 // solve the double dispatch problem by using RTTI information via dynamic cast
443- if (Selector_List_Ptr_Const sl = Cast<Selector_List>(&rhs)) { return this -> eq ( *sl) ; }
444- else if (Complex_Selector_Ptr_Const cpx = Cast<Complex_Selector>(&rhs)) { return this -> eq ( *cpx) ; }
445- else if (Compound_Selector_Ptr_Const cpd = Cast<Compound_Selector>(&rhs)) { return this -> eq ( *cpd) ; }
443+ if (Selector_List_Ptr_Const sl = Cast<Selector_List>(&rhs)) { return * this == *sl; }
444+ else if (Complex_Selector_Ptr_Const cpx = Cast<Complex_Selector>(&rhs)) { return * this == *cpx; }
445+ else if (Compound_Selector_Ptr_Const cpd = Cast<Compound_Selector>(&rhs)) { return * this == *cpd; }
446446 // no compare method
447447 return this == &rhs;
448448 }
@@ -451,8 +451,8 @@ namespace Sass {
451451 bool Selector_List::operator == (const Expression& rhs) const
452452 {
453453 // solve the double dispatch problem by using RTTI information via dynamic cast
454- if (List_Ptr_Const ls = Cast<List>(&rhs)) { return ls-> eq ( *this ) ; }
455- if (Selector_Ptr_Const ls = Cast<Selector>(&rhs)) { return this -> eq ( *ls) ; }
454+ if (List_Ptr_Const ls = Cast<List>(&rhs)) { return *ls == *this ; }
455+ if (Selector_Ptr_Const ls = Cast<Selector>(&rhs)) { return * this == *ls; }
456456 // compare invalid (maybe we should error?)
457457 return false ;
458458 }
@@ -691,7 +691,7 @@ namespace Sass {
691691 return (name () == rhs.name ())
692692 && (matcher () == rhs.matcher ())
693693 && (is_ns_eq (rhs))
694- && (value ()-> eq ( *rhs.value () ));
694+ && (* value () == *rhs.value ());
695695 }
696696 // not equal
697697 return false ;
@@ -750,7 +750,7 @@ namespace Sass {
750750 {
751751 String_Obj lhs_ex = expression ();
752752 String_Obj rhs_ex = rhs.expression ();
753- if (rhs_ex && lhs_ex) return lhs_ex-> eq ( *rhs_ex) ;
753+ if (rhs_ex && lhs_ex) return * lhs_ex == *rhs_ex;
754754 else return lhs_ex.ptr () == rhs_ex.ptr ();
755755 }
756756 else return false ;
@@ -1957,7 +1957,7 @@ namespace Sass {
19571957 Expression_Obj rv = (*r)[i];
19581958 Expression_Obj lv = (*this )[i];
19591959 if (!lv || !rv) return false ;
1960- if (!(lv-> eq ( *rv) )) return false ;
1960+ if (!(*lv == *rv)) return false ;
19611961 }
19621962 return true ;
19631963 }
@@ -1993,7 +1993,7 @@ namespace Sass {
19931993 Expression_Obj rv = r->at (i);
19941994 Expression_Obj lv = this ->at (i);
19951995 if (!lv || !rv) return false ;
1996- if (!(lv-> eq ( *rv) )) return false ;
1996+ if (!(*lv == *rv)) return false ;
19971997 }
19981998 return true ;
19991999 }
@@ -2008,7 +2008,7 @@ namespace Sass {
20082008 Expression_Obj lv = at (key);
20092009 Expression_Obj rv = r->at (key);
20102010 if (!rv || !lv) return false ;
2011- if (!(lv-> eq ( *rv) )) return false ;
2011+ if (!(*lv == *rv)) return false ;
20122012 }
20132013 return true ;
20142014 }
@@ -2223,4 +2223,4 @@ namespace Sass {
22232223 IMPLEMENT_AST_OPERATORS (Placeholder_Selector);
22242224 IMPLEMENT_AST_OPERATORS (Definition);
22252225 IMPLEMENT_AST_OPERATORS (Declaration);
2226- }
2226+ }
0 commit comments