From a176997a1377cf8260ab362d9df8f975035da0f5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 30 Mar 2012 21:00:52 +0300 Subject: [PATCH] Move the TargetMap typedef inside Builder --- source/analyzer.cpp | 4 ++-- source/builder.h | 4 ++++ source/component.cpp | 4 ++-- source/target.h | 2 -- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source/analyzer.cpp b/source/analyzer.cpp index 306bc4d..d59519c 100644 --- a/source/analyzer.cpp +++ b/source/analyzer.cpp @@ -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) diff --git a/source/builder.h b/source/builder.h index 18f4b52..4cfe0c1 100644 --- a/source/builder.h +++ b/source/builder.h @@ -52,6 +52,10 @@ private: void option(const std::string &, const std::string &); }; +public: + typedef std::map TargetMap; + +private: typedef std::list PackageList; typedef std::map PackageMap; typedef std::map ProfileTemplateMap; diff --git a/source/component.cpp b/source/component.cpp index ea53d23..a5076fb 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -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"); diff --git a/source/target.h b/source/target.h index 9d80412..d971a55 100644 --- a/source/target.h +++ b/source/target.h @@ -102,6 +102,4 @@ protected: virtual void build_done(); }; -typedef std::map TargetMap; - #endif -- 2.45.2