Last active
June 17, 2019 02:15
-
-
Save glebm/75a6ddf05cf4533e79601adddb6047fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/extender.cpp b/src/extender.cpp | |
index 6d96b8d0..8456a6a1 100644 | |
--- a/src/extender.cpp | |
+++ b/src/extender.cpp | |
@@ -287,11 +287,11 @@ namespace Sass { | |
// Note: this function could need some logic cleanup | |
// ########################################################################## | |
void Extender::addExtension( | |
- SelectorListObj& extender, | |
- SimpleSelectorObj& target, | |
+ SelectorListObj extender, | |
+ SimpleSelectorObj target, | |
// get get passed a pointer | |
ExtendRuleObj extend, | |
- CssMediaRuleObj& mediaQueryContext) | |
+ CssMediaRuleObj mediaQueryContext) | |
{ | |
auto rules = selectors.find(target); | |
@@ -419,7 +419,7 @@ namespace Sass { | |
ExtSelExtMap additionalExtensions; | |
- for (Extension extension : oldExtensions) { | |
+ for (const Extension &extension : oldExtensions) { | |
ExtSelExtMapEntry& sources = extensions[extension.target]; | |
std::vector<ComplexSelectorObj> selectors(extendComplex( | |
extension.extender, | |
diff --git a/src/extender.hpp b/src/extender.hpp | |
index 6b2938e5..a5879e2e 100644 | |
--- a/src/extender.hpp | |
+++ b/src/extender.hpp | |
@@ -206,11 +206,11 @@ namespace Sass { | |
// within the same context. A `null` context indicates no media queries. | |
// ########################################################################## | |
void addExtension( | |
- SelectorListObj& extender, | |
- SimpleSelectorObj& target, | |
+ SelectorListObj extender, | |
+ SimpleSelectorObj target, | |
// gets passed by pointer | |
ExtendRuleObj extend, | |
- CssMediaRuleObj& mediaQueryContext); | |
+ CssMediaRuleObj mediaQueryContext); | |
// ########################################################################## | |
// The set of all simple selectors in style rules handled | |
diff --git a/src/extension.cpp b/src/extension.cpp | |
index 0b10904d..05614db2 100644 | |
--- a/src/extension.cpp | |
+++ b/src/extension.cpp | |
@@ -11,7 +11,7 @@ namespace Sass { | |
// ########################################################################## | |
// Static function to create a copy with a new extender | |
// ########################################################################## | |
- Extension Extension::withExtender(ComplexSelectorObj newExtender) | |
+ Extension Extension::withExtender(ComplexSelectorObj newExtender) const | |
{ | |
Extension extension(newExtender); | |
extension.specificity = specificity; | |
diff --git a/src/extension.hpp b/src/extension.hpp | |
index d6e1d1d7..3580cf69 100644 | |
--- a/src/extension.hpp | |
+++ b/src/extension.hpp | |
@@ -80,7 +80,7 @@ namespace Sass { | |
// compatible with the query context for this extender. | |
void assertCompatibleMediaContext(CssMediaRuleObj mediaContext, Backtraces& traces) const; | |
- Extension withExtender(ComplexSelectorObj newExtender); | |
+ Extension withExtender(ComplexSelectorObj newExtender) const; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment