mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-17 18:22:44 +08:00
named_color_names to reserve the right amount
This commit is contained in:
parent
7322c9c591
commit
6943536ef3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user