diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-07 14:57:58 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-07 14:57:58 -0800 |
commit | b34721b3f458210caeafae7665c6d32962a24f63 (patch) | |
tree | 1ae0b7063bc63f63d9f996caf9bb6db70dc192af /parser.cpp | |
parent | cb6be2a50dbf6718fad88c3586e409a53c785324 (diff) |
Miscellaneous optimizations to reduce string copying
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1939,7 +1939,7 @@ int parser_t::parse_job(process_t *p, job_t *j, tokenizer_t *tok) } } } - args.push_back(completion_t(nxt)); + append_completion(args, nxt); } if (error_code == 0) @@ -1982,8 +1982,8 @@ int parser_t::parse_job(process_t *p, job_t *j, tokenizer_t *tok) if (use_implicit_cd) { args.clear(); - args.push_back(completion_t(L"cd")); - args.push_back(completion_t(implicit_cd_path)); + append_completion(args, L"cd"); + append_completion(args, implicit_cd_path); /* If we have defined a wrapper around cd, use it, otherwise use the cd builtin */ if (use_function && function_exists(L"cd")) |