We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 534065c commit 5801404Copy full SHA for 5801404
src/fn_colors.cpp
@@ -10,11 +10,11 @@ namespace Sass {
10
11
bool special_number(String_Constant_Ptr s) {
12
if (s) {
13
- std::string calc("calc(");
14
- std::string var("var(");
15
- std::string ss(s->value());
16
- return std::equal(calc.begin(), calc.end(), ss.begin()) ||
17
- std::equal(var.begin(), var.end(), ss.begin());
+ static const char* const calc = "calc(";
+ static const char* const var = "var(";
+ const std::string& str = s->value();
+ return str.compare(0, strlen(calc), calc) == 0 ||
+ str.compare(0, strlen(var), var) == 0;
18
}
19
return false;
20
0 commit comments