aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-07 14:57:58 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-07 14:57:58 -0800
commitb34721b3f458210caeafae7665c6d32962a24f63 (patch)
tree1ae0b7063bc63f63d9f996caf9bb6db70dc192af /env.cpp
parentcb6be2a50dbf6718fad88c3586e409a53c785324 (diff)
Miscellaneous optimizations to reduce string copying
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/env.cpp b/env.cpp
index 13f87b6c..acf132c8 100644
--- a/env.cpp
+++ b/env.cpp
@@ -892,6 +892,7 @@ int env_set(const wcstring &key, const wchar_t *val, int var_mode)
if (!is_universal)
{
event_t ev = event_t::variable_event(key);
+ ev.arguments.reserve(3);
ev.arguments.push_back(L"VARIABLE");
ev.arguments.push_back(L"SET");
ev.arguments.push_back(key);