diff options
author | Jan Kanis <jan.code@jankanis.nl> | 2012-12-20 10:52:44 +0100 |
---|---|---|
committer | Jan Kanis <jan.code@jankanis.nl> | 2012-12-20 16:13:14 +0100 |
commit | 71233ee89476aa92782ac8288eba6c1485a8477e (patch) | |
tree | 2d9bc3087226cc23d4b4b3f0d7ff35a4a0e0a573 /proc.cpp | |
parent | af3059ab2ad4ccbfec3c0789b198388cc90fbcbb (diff) |
Make event_t.arguments into a vector instead of an auto_ptr<vector>.
Yay for less indirection and less code! The resulting event_t structure is two pointers larger, but cuts out an indirection and allocation.
Diffstat (limited to 'proc.cpp')
-rw-r--r-- | proc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -162,7 +162,6 @@ static std::vector<int> interactive_stack; void proc_init() { proc_push_interactive(0); - event.arguments.reset(new wcstring_list_t); } @@ -194,7 +193,6 @@ void job_free(job_t * j) void proc_destroy() { - event.arguments.reset(NULL); job_list_t &jobs = parser_t::principal_parser().job_list(); while (! jobs.empty()) { @@ -603,11 +601,11 @@ void proc_fire_event(const wchar_t *msg, int type, pid_t pid, int status) event.type=type; event.param1.pid = pid; - event.arguments->push_back(msg); - event.arguments->push_back(to_string<int>(pid)); - event.arguments->push_back(to_string<int>(status)); + event.arguments.push_back(msg); + event.arguments.push_back(to_string<int>(pid)); + event.arguments.push_back(to_string<int>(status)); event_fire(&event); - event.arguments->resize(0); + event.arguments.resize(0); } int job_reap(bool interactive) |