]> git.tdb.fi Git - builder.git/commitdiff
Use a typedef for ExternalTask arguments
authorMikko Rasa <tdb@tdb.fi>
Fri, 8 Jun 2012 07:25:14 +0000 (10:25 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jul 2012 21:08:53 +0000 (00:08 +0300)
source/builder.cpp
source/externaltask.h
source/gnucompiler.cpp

index ed749f818e464bb7df7ba8d00d44d11e6f16e313..2591fc35bbfdd90333e3556d53fa8ecb07811081 100644 (file)
@@ -305,7 +305,7 @@ int Builder::main()
 
 string Builder::run_pkgconfig(const string &pkg, const string &what)
 {
-       vector<string> argv;
+       ExternalTask::Arguments argv;
        argv.push_back("pkg-config");
        if(what=="cflags" || what=="libs")
                argv.push_back("--"+what);
index b23bb66728805e280359705ff61a6b2b1436b55f..c9bc823112db7b3cb55eb7eeea043b2a94f140d1 100644 (file)
@@ -17,8 +17,10 @@ public:
                IGNORE
        };
 
+       typedef std::vector<std::string> Arguments;
+
 private:
-       std::vector<std::string> 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<std::string> &, const Msp::FS::Path &);
+       ExternalTask(const Arguments &, const Msp::FS::Path &);
        virtual ~ExternalTask();
 
        virtual std::string get_command() const;
index 34b4e947a49e2f2637443e3d2f4aca70403ce006..189e5148285c827015aaf203c2891a00ece39047 100644 (file)
@@ -32,7 +32,7 @@ Task *GnuCompiler::run(const Target &target) const
        const ObjectFile &object = dynamic_cast<const ObjectFile &>(target);
        const Component &comp = object.get_component();
 
-       vector<string> argv;
+       ExternalTask::Arguments argv;
        argv.push_back(name);
        argv.push_back("-c");