@@ -48,33 +48,13 @@ namespace Sass {
4848 {
4949 value_ = str_rtrim (value_);
5050 }
51- void String_Constant::ltrim ()
52- {
53- value_ = str_ltrim (value_);
54- }
55- void String_Constant::trim ()
56- {
57- rtrim ();
58- ltrim ();
59- }
6051
6152 void String_Schema::rtrim ()
6253 {
6354 if (!empty ()) {
6455 if (String_Ptr str = Cast<String>(last ())) str->rtrim ();
6556 }
6657 }
67- void String_Schema::ltrim ()
68- {
69- if (!empty ()) {
70- if (String_Ptr str = Cast<String>(first ())) str->ltrim ();
71- }
72- }
73- void String_Schema::trim ()
74- {
75- rtrim ();
76- ltrim ();
77- }
7858
7959 void Argument::set_delayed (bool delayed)
8060 {
@@ -124,11 +104,6 @@ namespace Sass {
124104 pstate_.offset += pstate - pstate_ + pstate.offset ;
125105 }
126106
127- void AST_Node::set_pstate_offset (const Offset& offset)
128- {
129- pstate_.offset = offset;
130- }
131-
132107 bool Simple_Selector::is_ns_eq (const Simple_Selector& r) const
133108 {
134109 // https://github.com/sass/sass/issues/2229
@@ -655,9 +630,8 @@ namespace Sass {
655630 {
656631 return *this == *w;
657632 }
658- if (is_ns_eq (rhs))
659- { return name () == rhs.name (); }
660- return ns () == rhs.ns ();
633+ return is_ns_eq (rhs) &&
634+ name () == rhs.name ();
661635 }
662636
663637 bool Pseudo_Selector::operator == (const Pseudo_Selector& rhs) const
@@ -678,9 +652,8 @@ namespace Sass {
678652 {
679653 return *this == *w;
680654 }
681- if (is_ns_eq (rhs))
682- { return name () == rhs.name (); }
683- return ns () == rhs.ns ();
655+ return is_ns_eq (rhs) &&
656+ name () == rhs.name ();
684657 }
685658
686659 bool Pseudo_Selector::operator < (const Pseudo_Selector& rhs) const
@@ -721,9 +694,8 @@ namespace Sass {
721694 {
722695 return *this == *w;
723696 }
724- if (is_ns_eq (rhs))
725- { return name () == rhs.name (); }
726- return ns () == rhs.ns ();
697+ return is_ns_eq (rhs) &&
698+ name () == rhs.name ();
727699 }
728700
729701 bool Wrapped_Selector::operator < (const Wrapped_Selector& rhs) const
@@ -754,10 +726,8 @@ namespace Sass {
754726 if (Selector_List_Obj lhs_list = Cast<Selector_List>(selector ())) {
755727 return lhs_list->is_superselector_of (rhs_list);
756728 }
757- error (" is_superselector expected a Selector_List" , sub->pstate ());
758- } else {
759- error (" is_superselector expected a Selector_List" , sub->pstate ());
760729 }
730+ error (" is_superselector expected a Selector_List" , sub->pstate ());
761731 return false ;
762732 }
763733
@@ -1095,15 +1065,6 @@ namespace Sass {
10951065 return 1 + tail ()->length ();
10961066 }
10971067
1098- Complex_Selector_Obj Complex_Selector::context (Context& ctx)
1099- {
1100- if (!tail ()) return 0 ;
1101- if (!head ()) return tail ()->context (ctx);
1102- Complex_Selector_Obj cpy = SASS_MEMORY_NEW (Complex_Selector, pstate (), combinator (), head (), tail ()->context (ctx));
1103- cpy->media_block (media_block ());
1104- return cpy;
1105- }
1106-
11071068 // append another complex selector at the end
11081069 // check if we need to append some headers
11091070 // then we need to check for the combinator
@@ -1611,14 +1572,6 @@ namespace Sass {
16111572 }
16121573 };
16131574
1614- std::vector<std::string> Compound_Selector::to_str_vec ()
1615- {
1616- std::vector<std::string> result (length ());
1617- for (size_t i = 0 , L = length (); i < L; ++i)
1618- { result.push_back ((*this )[i]->to_string ()); }
1619- return result;
1620- }
1621-
16221575 void Compound_Selector::append (Simple_Selector_Ptr element)
16231576 {
16241577 Vectorized<Simple_Selector_Obj>::append (element);
@@ -2105,21 +2058,6 @@ namespace Sass {
21052058 return false ;
21062059 }
21072060
2108- bool Number::eq (const Expression& rhs) const
2109- {
2110- if (Number_Ptr_Const r = Cast<Number>(&rhs)) {
2111- size_t lhs_units = numerator_units_.size () + denominator_units_.size ();
2112- size_t rhs_units = r->numerator_units_ .size () + r->denominator_units_ .size ();
2113- if (!lhs_units && !rhs_units) {
2114- return std::fabs (value () - r->value ()) < NUMBER_EPSILON;
2115- }
2116- return (numerator_units_ == r->numerator_units_ ) &&
2117- (denominator_units_ == r->denominator_units_ ) &&
2118- std::fabs (value () - r->value ()) < NUMBER_EPSILON;
2119- }
2120- return false ;
2121- }
2122-
21232061 bool Number::operator == (const Expression& rhs) const
21242062 {
21252063 if (Number_Ptr_Const r = Cast<Number>(&rhs)) {
0 commit comments