From 47b06998f4f1c896928cee1911de3f7a43b283f4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 8 Jun 2012 10:25:14 +0300 Subject: [PATCH] Use a typedef for ExternalTask arguments --- source/builder.cpp | 2 +- source/externaltask.h | 6 ++++-- source/gnucompiler.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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"); -- 2.45.2