@@ -1469,50 +1469,35 @@ namespace Sass {
14691469 return string ();
14701470 }
14711471
1472- bool Custom_Warning::operator == (const Expression* rhs) const
1472+ bool Custom_Warning::operator == (const Expression& rhs) const
14731473 {
1474- if (const Custom_Warning* r = dynamic_cast <const Custom_Warning*>(rhs)) {
1474+ if (const Custom_Warning* r = dynamic_cast <const Custom_Warning*>(& rhs)) {
14751475 return message () == r->message ();
14761476 }
14771477 return false ;
14781478 }
14791479
1480- bool Custom_Warning::operator == (const Expression& rhs) const
1481- {
1482- return operator ==(&rhs);
1483- }
1484-
1485- bool Custom_Error::operator == (const Expression* rhs) const
1480+ bool Custom_Error::operator == (const Expression& rhs) const
14861481 {
1487- if (const Custom_Error* r = dynamic_cast <const Custom_Error*>(rhs)) {
1482+ if (const Custom_Error* r = dynamic_cast <const Custom_Error*>(& rhs)) {
14881483 return message () == r->message ();
14891484 }
14901485 return false ;
14911486 }
14921487
1493- bool Custom_Error::operator == (const Expression& rhs) const
1494- {
1495- return operator ==(&rhs);
1496- }
1497-
1498- bool Number::operator == (const Expression* rhs) const
1488+ bool Number::operator == (const Expression& rhs) const
14991489 {
1500- if (const Number* r = dynamic_cast <const Number*>(rhs)) {
1490+ if (const Number* r = dynamic_cast <const Number*>(& rhs)) {
15011491 return (value () == r->value ()) &&
15021492 (numerator_units_ == r->numerator_units_ ) &&
15031493 (denominator_units_ == r->denominator_units_ );
15041494 }
15051495 return false ;
15061496 }
15071497
1508- bool Number::operator == (const Expression& rhs) const
1509- {
1510- return operator ==(&rhs);
1511- }
1512-
1513- bool Number::operator < (const Number* rhs) const
1498+ bool Number::operator < (const Number& rhs) const
15141499 {
1515- Number tmp_r (* rhs);
1500+ Number tmp_r (rhs);
15161501 tmp_r.normalize (find_convertible_unit ());
15171502 string l_unit (unit ());
15181503 string r_unit (tmp_r.unit ());
@@ -1522,44 +1507,29 @@ namespace Sass {
15221507 return value () < tmp_r.value ();
15231508 }
15241509
1525- bool Number::operator < (const Number& rhs) const
1526- {
1527- return operator <(&rhs);
1528- }
1529-
1530- bool String_Quoted::operator == (const Expression* rhs) const
1510+ bool String_Quoted::operator == (const Expression& rhs) const
15311511 {
1532- if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(rhs)) {
1512+ if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(& rhs)) {
15331513 return (value () == qstr->value ());
1534- } else if (const String_Constant* cstr = dynamic_cast <const String_Constant*>(rhs)) {
1514+ } else if (const String_Constant* cstr = dynamic_cast <const String_Constant*>(& rhs)) {
15351515 return (value () == cstr->value ());
15361516 }
15371517 return false ;
15381518 }
15391519
1540- bool String_Quoted::operator == (const Expression& rhs) const
1541- {
1542- return operator ==(&rhs);
1543- }
1544-
1545- bool String_Constant::operator == (const Expression* rhs) const
1520+ bool String_Constant::operator == (const Expression& rhs) const
15461521 {
1547- if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(rhs)) {
1522+ if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(& rhs)) {
15481523 return (value () == qstr->value ());
1549- } else if (const String_Constant* cstr = dynamic_cast <const String_Constant*>(rhs)) {
1524+ } else if (const String_Constant* cstr = dynamic_cast <const String_Constant*>(& rhs)) {
15501525 return (value () == cstr->value ());
15511526 }
15521527 return false ;
15531528 }
15541529
1555- bool String_Constant::operator == (const Expression& rhs) const
1556- {
1557- return operator ==(&rhs);
1558- }
1559-
1560- bool String_Schema::operator == (const Expression* rhs) const
1530+ bool String_Schema::operator == (const Expression& rhs) const
15611531 {
1562- if (const String_Schema* r = dynamic_cast <const String_Schema*>(rhs)) {
1532+ if (const String_Schema* r = dynamic_cast <const String_Schema*>(& rhs)) {
15631533 if (length () != r->length ()) return false ;
15641534 for (size_t i = 0 , L = length (); i < L; ++i) {
15651535 Expression* rv = (*r)[i];
@@ -1572,27 +1542,17 @@ namespace Sass {
15721542 return false ;
15731543 }
15741544
1575- bool String_Schema::operator == (const Expression& rhs) const
1576- {
1577- return operator ==(&rhs);
1578- }
1579-
1580- bool Boolean::operator == (const Expression* rhs) const
1545+ bool Boolean::operator == (const Expression& rhs) const
15811546 {
1582- if (const Boolean* r = dynamic_cast <const Boolean*>(rhs)) {
1547+ if (const Boolean* r = dynamic_cast <const Boolean*>(& rhs)) {
15831548 return (value () == r->value ());
15841549 }
15851550 return false ;
15861551 }
15871552
1588- bool Boolean::operator == (const Expression& rhs) const
1589- {
1590- return operator ==(&rhs);
1591- }
1592-
1593- bool Color::operator == (const Expression* rhs) const
1553+ bool Color::operator == (const Expression& rhs) const
15941554 {
1595- if (const Color* r = dynamic_cast <const Color*>(rhs)) {
1555+ if (const Color* r = dynamic_cast <const Color*>(& rhs)) {
15961556 return r_ == r->r () &&
15971557 g_ == r->g () &&
15981558 b_ == r->b () &&
@@ -1601,14 +1561,9 @@ namespace Sass {
16011561 return false ;
16021562 }
16031563
1604- bool Color::operator == (const Expression& rhs) const
1605- {
1606- return operator ==(&rhs);
1607- }
1608-
1609- bool List::operator == (const Expression* rhs) const
1564+ bool List::operator == (const Expression& rhs) const
16101565 {
1611- if (const List* r = dynamic_cast <const List*>(rhs)) {
1566+ if (const List* r = dynamic_cast <const List*>(& rhs)) {
16121567 if (length () != r->length ()) return false ;
16131568 if (separator () != r->separator ()) return false ;
16141569 for (size_t i = 0 , L = length (); i < L; ++i) {
@@ -1622,14 +1577,9 @@ namespace Sass {
16221577 return false ;
16231578 }
16241579
1625- bool List::operator == (const Expression& rhs) const
1626- {
1627- return operator ==(&rhs);
1628- }
1629-
1630- bool Map::operator == (const Expression* rhs) const
1580+ bool Map::operator == (const Expression& rhs) const
16311581 {
1632- if (const Map* r = dynamic_cast <const Map*>(rhs)) {
1582+ if (const Map* r = dynamic_cast <const Map*>(& rhs)) {
16331583 if (length () != r->length ()) return false ;
16341584 for (auto key : keys ()) {
16351585 Expression* lv = at (key);
@@ -1642,19 +1592,9 @@ namespace Sass {
16421592 return false ;
16431593 }
16441594
1645- bool Map::operator == (const Expression& rhs) const
1646- {
1647- return operator ==(&rhs);
1648- }
1649-
1650- bool Null::operator == (const Expression* rhs) const
1651- {
1652- return rhs->concrete_type () == NULL_VAL;
1653- }
1654-
16551595 bool Null::operator == (const Expression& rhs) const
16561596 {
1657- return operator ==(& rhs) ;
1597+ return rhs. concrete_type () == NULL_VAL ;
16581598 }
16591599
16601600 size_t List::size () const {
0 commit comments