]> git.tdb.fi Git - builder.git/blobdiff - source/externaltask.h
Use default member initializers and constructor delegation
[builder.git] / source / externaltask.h
index 26a6acabe569356e630e109289ed8cb8e80e0546..9b9bc438867ce5884241249dedbe6b511af87ed8 100644 (file)
@@ -24,19 +24,19 @@ public:
                IGNORE        //< Redirect the stream to oblivion
        };
 
-       typedef Msp::Process::Arguments Arguments;
+       using Arguments = Msp::Process::Arguments;
 
 private:
        Arguments argv;
        Msp::FS::Path work_dir;
-       Msp::Process *process;
-       int exit_code;
-       StreamAction stdin_action;
+       Msp::Process *process = 0;
+       int exit_code = -1;
+       StreamAction stdin_action = PASSTHROUGH;
        Msp::FS::Path stdin_file;
-       StreamAction stdout_action;
+       StreamAction stdout_action = PASSTHROUGH;
        Msp::FS::Path stdout_file;
-       StreamAction stderr_action;
-       Msp::IO::Pipe *capture_pipe;
+       StreamAction stderr_action = PASSTHROUGH;
+       Msp::IO::Pipe *capture_pipe = 0;
        std::string output;
 
 public:
@@ -45,12 +45,12 @@ public:
        name.  If the working directory is not specified, no chdir is done. */
        ExternalTask(const Arguments &, const Msp::FS::Path & = Msp::FS::Path());
 
-       virtual ~ExternalTask();
+       ~ExternalTask();
 
-       virtual std::string get_command() const;
-       virtual void start();
-       virtual Status check();
-       virtual Status wait();
+       std::string get_command() const override;
+       void start() override;
+       Status check() override;
+       Status wait() override;
 private:
        Status do_wait(bool);