]> git.tdb.fi Git - builder.git/commitdiff
Move the TargetMap typedef inside Builder
authorMikko Rasa <tdb@tdb.fi>
Fri, 30 Mar 2012 18:00:52 +0000 (21:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 30 Mar 2012 19:22:13 +0000 (22:22 +0300)
source/analyzer.cpp
source/builder.h
source/component.cpp
source/target.h

index 306bc4d736b68b999f940546b0a90f9880e962d3..d59519c13115c186d52fc230353690c08372bd62 100644 (file)
@@ -23,8 +23,8 @@ void Analyzer::analyze()
        if(mode==RDEPS)
        {
                rdepends.clear();
-               const TargetMap &targets = builder.get_targets();
-               for(TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
+               const Builder::TargetMap &targets = builder.get_targets();
+               for(Builder::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
                {
                        const TargetList &depends = i->second->get_depends();
                        for(TargetList::const_iterator j=depends.begin(); j!=depends.end(); ++j)
index 18f4b52c56dfa744f085d4e3e2eaeb2e486856b4..4cfe0c158e3b111546a11d9782af2ae0bbce21e7 100644 (file)
@@ -52,6 +52,10 @@ private:
                void option(const std::string &, const std::string &);
        };
 
+public:
+       typedef std::map<std::string, Target *> TargetMap;
+
+private:
        typedef std::list<Package *> PackageList;
        typedef std::map<std::string, Package *> PackageMap;
        typedef std::map<std::string, StringMap> ProfileTemplateMap;
index ea53d23ea94693fb35e79a290bd5a9364215b018..a5076fb3a71d75fefdc1f88f6ea88a0e71688b20 100644 (file)
@@ -113,8 +113,8 @@ void Component::create_targets() const
 
                if(name=="@src")
                {
-                       const TargetMap &targets = builder.get_targets();
-                       for(TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
+                       const Builder::TargetMap &targets = builder.get_targets();
+                       for(Builder::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
                                if(i->second->get_package()==&pkg && !i->second->is_buildable())
                                        result->add_depend(i->second);
                        files.push_back(pkg.get_source()/"Build");
index 9d804129be37eaf4c695c3e783a72b59069c02b0..d971a55bbd46f7dd8a444903a3477c69c02a8a2b 100644 (file)
@@ -102,6 +102,4 @@ protected:
        virtual void build_done();
 };
 
-typedef std::map<std::string, Target *> TargetMap;
-
 #endif