diff options
author | 2012-02-01 16:27:14 -0800 | |
---|---|---|
committer | 2012-02-01 16:27:14 -0800 | |
commit | 62f49c55cec0dc8b4b2b41d1eff4f1a02ba18431 (patch) | |
tree | 7624163acd470ec1a16a4ac50113fd3f3088f7ba /parser.cpp | |
parent | 0b4b6c498d4cac8591dcfc04549acd62305d5008 (diff) |
Clean up uses of completion_t
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -1872,9 +1872,7 @@ int parser_t::parse_job( process_t *p, } } } - completion_t data_to_push; - data_to_push.completion = nxt; - args.push_back( data_to_push ); + args.push_back(completion_t(nxt)); } if( error_code == 0 ) @@ -1922,12 +1920,8 @@ int parser_t::parse_job( process_t *p, // al_truncate( args, 0 ); args.clear(); // al_push( args, halloc_wcsdup( j, L"cd" ) ); - completion_t comp; - comp.completion = L"cd"; - args.push_back(comp); - completion_t comp2; - comp2.completion = tmp; - args.push_back( comp2 ); + args.push_back(completion_t(L"cd")); + args.push_back(completion_t(tmp)); /* If we have defined a wrapper around cd, use it, otherwise use the cd builtin @@ -2108,9 +2102,7 @@ int parser_t::parse_job( process_t *p, const wcstring sub_block(tok_string( tok ) + current_tokenizer_pos, end_pos - current_tokenizer_pos); p->type = INTERNAL_BLOCK; - completion_t data_to_push; - data_to_push.completion = sub_block; - args.at( 0 ) = data_to_push; + args.at( 0 ) = completion_t(sub_block); tok_set_pos( tok, end_pos ); |