@@ -1469,50 +1469,35 @@ namespace Sass {
1469
1469
return string ();
1470
1470
}
1471
1471
1472
- bool Custom_Warning::operator == (const Expression* rhs) const
1472
+ bool Custom_Warning::operator == (const Expression& rhs) const
1473
1473
{
1474
- if (const Custom_Warning* r = dynamic_cast <const Custom_Warning*>(rhs)) {
1474
+ if (const Custom_Warning* r = dynamic_cast <const Custom_Warning*>(& rhs)) {
1475
1475
return message () == r->message ();
1476
1476
}
1477
1477
return false ;
1478
1478
}
1479
1479
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
1486
1481
{
1487
- if (const Custom_Error* r = dynamic_cast <const Custom_Error*>(rhs)) {
1482
+ if (const Custom_Error* r = dynamic_cast <const Custom_Error*>(& rhs)) {
1488
1483
return message () == r->message ();
1489
1484
}
1490
1485
return false ;
1491
1486
}
1492
1487
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
1499
1489
{
1500
- if (const Number* r = dynamic_cast <const Number*>(rhs)) {
1490
+ if (const Number* r = dynamic_cast <const Number*>(& rhs)) {
1501
1491
return (value () == r->value ()) &&
1502
1492
(numerator_units_ == r->numerator_units_ ) &&
1503
1493
(denominator_units_ == r->denominator_units_ );
1504
1494
}
1505
1495
return false ;
1506
1496
}
1507
1497
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
1514
1499
{
1515
- Number tmp_r (* rhs);
1500
+ Number tmp_r (rhs);
1516
1501
tmp_r.normalize (find_convertible_unit ());
1517
1502
string l_unit (unit ());
1518
1503
string r_unit (tmp_r.unit ());
@@ -1522,44 +1507,29 @@ namespace Sass {
1522
1507
return value () < tmp_r.value ();
1523
1508
}
1524
1509
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
1531
1511
{
1532
- if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(rhs)) {
1512
+ if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(& rhs)) {
1533
1513
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)) {
1535
1515
return (value () == cstr->value ());
1536
1516
}
1537
1517
return false ;
1538
1518
}
1539
1519
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
1546
1521
{
1547
- if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(rhs)) {
1522
+ if (const String_Quoted* qstr = dynamic_cast <const String_Quoted*>(& rhs)) {
1548
1523
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)) {
1550
1525
return (value () == cstr->value ());
1551
1526
}
1552
1527
return false ;
1553
1528
}
1554
1529
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
1561
1531
{
1562
- if (const String_Schema* r = dynamic_cast <const String_Schema*>(rhs)) {
1532
+ if (const String_Schema* r = dynamic_cast <const String_Schema*>(& rhs)) {
1563
1533
if (length () != r->length ()) return false ;
1564
1534
for (size_t i = 0 , L = length (); i < L; ++i) {
1565
1535
Expression* rv = (*r)[i];
@@ -1572,27 +1542,17 @@ namespace Sass {
1572
1542
return false ;
1573
1543
}
1574
1544
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
1581
1546
{
1582
- if (const Boolean* r = dynamic_cast <const Boolean*>(rhs)) {
1547
+ if (const Boolean* r = dynamic_cast <const Boolean*>(& rhs)) {
1583
1548
return (value () == r->value ());
1584
1549
}
1585
1550
return false ;
1586
1551
}
1587
1552
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
1594
1554
{
1595
- if (const Color* r = dynamic_cast <const Color*>(rhs)) {
1555
+ if (const Color* r = dynamic_cast <const Color*>(& rhs)) {
1596
1556
return r_ == r->r () &&
1597
1557
g_ == r->g () &&
1598
1558
b_ == r->b () &&
@@ -1601,14 +1561,9 @@ namespace Sass {
1601
1561
return false ;
1602
1562
}
1603
1563
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
1610
1565
{
1611
- if (const List* r = dynamic_cast <const List*>(rhs)) {
1566
+ if (const List* r = dynamic_cast <const List*>(& rhs)) {
1612
1567
if (length () != r->length ()) return false ;
1613
1568
if (separator () != r->separator ()) return false ;
1614
1569
for (size_t i = 0 , L = length (); i < L; ++i) {
@@ -1622,14 +1577,9 @@ namespace Sass {
1622
1577
return false ;
1623
1578
}
1624
1579
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
1631
1581
{
1632
- if (const Map* r = dynamic_cast <const Map*>(rhs)) {
1582
+ if (const Map* r = dynamic_cast <const Map*>(& rhs)) {
1633
1583
if (length () != r->length ()) return false ;
1634
1584
for (auto key : keys ()) {
1635
1585
Expression* lv = at (key);
@@ -1642,19 +1592,9 @@ namespace Sass {
1642
1592
return false ;
1643
1593
}
1644
1594
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
-
1655
1595
bool Null::operator == (const Expression& rhs) const
1656
1596
{
1657
- return operator ==(& rhs) ;
1597
+ return rhs. concrete_type () == NULL_VAL ;
1658
1598
}
1659
1599
1660
1600
size_t List::size () const {
0 commit comments