Teach a job its command at constructor time

No point in allowing this to be set later.
This commit is contained in:
ridiculousfish
2020-07-17 14:05:23 -07:00
parent f30ce21aaa
commit ba8b89873e
3 changed files with 7 additions and 11 deletions

View File

@@ -383,8 +383,10 @@ static uint64_t next_internal_job_id() {
return ++s_next;
}
job_t::job_t(const properties_t &props)
: properties(props), internal_job_id(next_internal_job_id()) {}
job_t::job_t(const properties_t &props, wcstring command_str)
: properties(props),
command_str(std::move(command_str)),
internal_job_id(next_internal_job_id()) {}
job_t::~job_t() = default;