From: Mikko Rasa Date: Fri, 8 Jun 2012 07:25:14 +0000 (+0300) Subject: Use a typedef for ExternalTask arguments X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=47b06998f4f1c896928cee1911de3f7a43b283f4;p=builder.git Use a typedef for ExternalTask arguments --- diff --git a/source/builder.cpp b/source/builder.cpp index ed749f8..2591fc3 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -305,7 +305,7 @@ int Builder::main() string Builder::run_pkgconfig(const string &pkg, const string &what) { - vector argv; + ExternalTask::Arguments argv; argv.push_back("pkg-config"); if(what=="cflags" || what=="libs") argv.push_back("--"+what); diff --git a/source/externaltask.h b/source/externaltask.h index b23bb66..c9bc823 100644 --- a/source/externaltask.h +++ b/source/externaltask.h @@ -17,8 +17,10 @@ public: IGNORE }; + typedef std::vector Arguments; + private: - std::vector argv; + Arguments argv; Msp::FS::Path work_dir; int pid; int exit_code; @@ -28,7 +30,7 @@ private: std::string output; public: - ExternalTask(const std::vector &, const Msp::FS::Path &); + ExternalTask(const Arguments &, const Msp::FS::Path &); virtual ~ExternalTask(); virtual std::string get_command() const; diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 34b4e94..189e514 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -32,7 +32,7 @@ Task *GnuCompiler::run(const Target &target) const const ObjectFile &object = dynamic_cast(target); const Component &comp = object.get_component(); - vector argv; + ExternalTask::Arguments argv; argv.push_back(name); argv.push_back("-c");