summaryrefslogtreecommitdiff
path: root/interaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'interaction.cpp')
-rw-r--r--interaction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/interaction.cpp b/interaction.cpp
index c25095bb..afaa2b4a 100644
--- a/interaction.cpp
+++ b/interaction.cpp
@@ -276,6 +276,7 @@ static bool GetChoiceInputCallback(
{
InteractionHandler* handler = (InteractionHandler*)ctxt;
vector<string> choiceStrs;
+ choiceStrs.reserve(count);
for (size_t i = 0; i < count; i++)
choiceStrs.push_back(choices[i]);
return handler->GetChoiceInput(*result, prompt, title, choiceStrs);
@@ -287,6 +288,7 @@ static bool GetLargeChoiceInputCallback(
{
InteractionHandler* handler = (InteractionHandler*)ctxt;
vector<string> choiceStrs;
+ choiceStrs.reserve(count);
for (size_t i = 0; i < count; i++)
choiceStrs.push_back(choices[i]);
return handler->GetLargeChoiceInput(*result, prompt,title, choiceStrs);