named_color_names to reserve the right amount

This commit is contained in:
ridiculousfish 2015-12-08 20:32:59 -08:00
parent 7322c9c591
commit 6943536ef3

View file

@ -188,7 +188,7 @@ wcstring_list_t rgb_color_t::named_color_names(void)
{
size_t count = sizeof named_colors / sizeof *named_colors;
wcstring_list_t result;
result.reserve(count);
result.reserve(1 + count);
for (size_t i=0; i < count; i++)
{
result.push_back(named_colors[i].name);