File tree Expand file tree Collapse file tree 5 files changed +937
-463
lines changed Expand file tree Collapse file tree 5 files changed +937
-463
lines changed Original file line number Diff line number Diff line change @@ -1466,18 +1466,18 @@ namespace Sass {
1466
1466
double a = cap_channel<1 > (a_);
1467
1467
1468
1468
// get color from given name (if one was given at all)
1469
- if (name != " " && names_to_colors. count (name)) {
1470
- Color* n = names_to_colors. find (name)-> second ;
1469
+ if (name != " " && name_to_color (name)) {
1470
+ const Color* n = name_to_color (name);
1471
1471
r = round (cap_channel<0xff >(n->r ()));
1472
1472
g = round (cap_channel<0xff >(n->g ()));
1473
1473
b = round (cap_channel<0xff >(n->b ()));
1474
1474
a = cap_channel<1 > (n->a ());
1475
1475
}
1476
1476
// otherwise get the possible resolved color name
1477
1477
else {
1478
- int numval = static_cast < int >(r) * 0x10000 + static_cast < int >(g) * 0x100 + static_cast < int >(b) ;
1479
- if (colors_to_names. count (numval))
1480
- res_name = colors_to_names. find (numval)-> second ;
1478
+ int numval = r * 0x10000 + g * 0x100 + b ;
1479
+ if (color_to_name (numval))
1480
+ res_name = color_to_name (numval);
1481
1481
}
1482
1482
1483
1483
stringstream hexlet;
You can’t perform that action at this time.
0 commit comments