@@ -313,7 +313,7 @@ namespace Sass {
313313 const Color_RGBA transparent (color_table, 0 , 0 , 0 , 0 );
314314 }
315315
316- const std::map< const int , const char *> colors_to_names {
316+ static const auto * const colors_to_names = new std::unordered_map< int , const char *> {
317317 { 240 * 0x10000 + 248 * 0x100 + 255 , ColorNames::aliceblue },
318318 { 250 * 0x10000 + 235 * 0x100 + 215 , ColorNames::antiquewhite },
319319 { 0 * 0x10000 + 255 * 0x100 + 255 , ColorNames::cyan },
@@ -455,7 +455,7 @@ namespace Sass {
455455 { 102 * 0x10000 + 51 * 0x100 + 153 , ColorNames::rebeccapurple }
456456 };
457457
458- const std::map< const char * , const Color_RGBA*, map_cmp_str> names_to_colors
458+ static const auto * const names_to_colors = new std::unordered_map<std::string , const Color_RGBA*>
459459 {
460460 { ColorNames::aliceblue, &Colors::aliceblue },
461461 { ColorNames::antiquewhite, &Colors::antiquewhite },
@@ -619,20 +619,20 @@ namespace Sass {
619619 std::string lower{key};
620620 std::transform (lower.begin (), lower.end (), lower.begin (), ::tolower);
621621
622- auto p = names_to_colors. find (lower. c_str () );
623- if (p != names_to_colors. end ()) {
622+ auto p = names_to_colors-> find (lower);
623+ if (p != names_to_colors-> end ()) {
624624 return p->second ;
625625 }
626- return 0 ;
626+ return nullptr ;
627627 }
628628
629629 const char * color_to_name (const int key)
630630 {
631- auto p = colors_to_names. find (key);
632- if (p != colors_to_names. end ()) {
631+ auto p = colors_to_names-> find (key);
632+ if (p != colors_to_names-> end ()) {
633633 return p->second ;
634634 }
635- return 0 ;
635+ return nullptr ;
636636 }
637637
638638 const char * color_to_name (const double key)
0 commit comments