diff options
| author | Scott Lagler <laglerscott@gmail.com> | 2025-12-12 19:20:21 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2025-12-16 17:45:24 -0500 |
| commit | 6138978808829172448615980742756831959788 (patch) | |
| tree | 746bb0a634c139967c1755dcbcfb8c3395b97ff5 /interaction.cpp | |
| parent | 3967000448807875468673398445854536525610 (diff) | |
Add more reserve calls
Diffstat (limited to 'interaction.cpp')
| -rw-r--r-- | interaction.cpp | 2 |
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); |
