From: Mikko Rasa Date: Sat, 21 Apr 2012 18:05:39 +0000 (+0300) Subject: Rename BuildInfo::add to update_from X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3e8bf5032e744b5fc3e7680af48f2abacc67addc;p=builder.git Rename BuildInfo::add to update_from --- diff --git a/source/buildinfo.cpp b/source/buildinfo.cpp index 2bf928a..0ac20c9 100644 --- a/source/buildinfo.cpp +++ b/source/buildinfo.cpp @@ -23,7 +23,7 @@ void unique(StringList &l) } -void BuildInfo::add(const BuildInfo &bi) +void BuildInfo::update_from(const BuildInfo &bi) { cflags.insert(cflags.end(), bi.cflags.begin(), bi.cflags.end()); defines.insert(defines.end(), bi.defines.begin(), bi.defines.end()); diff --git a/source/buildinfo.h b/source/buildinfo.h index 26e56c1..11de3b0 100644 --- a/source/buildinfo.h +++ b/source/buildinfo.h @@ -39,7 +39,7 @@ public: StringList warnings; /** Adds another BuildInfo to the end of this one. */ - void add(const BuildInfo &); + void update_from(const BuildInfo &); /** Makes sure there are no duplicate entries in the lists. For warnings, contradicting flags are eliminated and the last one stays in effect. */ diff --git a/source/component.cpp b/source/component.cpp index 2780070..1eb93ce 100644 --- a/source/component.cpp +++ b/source/component.cpp @@ -49,7 +49,7 @@ void Component::create_build_info() for(PackageList::iterator i=all_reqs.begin(); i!=all_reqs.end(); ++i) { if(find(direct_reqs.begin(), direct_reqs.end(), *i)!=direct_reqs.end()) - build_info.add((*i)->get_exported_binfo()); + build_info.update_from((*i)->get_exported_binfo()); else { const BuildInfo &ebi = (*i)->get_exported_binfo(); @@ -64,7 +64,7 @@ void Component::create_build_info() all_reqs.push_back(*j); } - build_info.add(pkg.get_build_info()); + build_info.update_from(pkg.get_build_info()); for(StringList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i) *i = (pkg.get_source() / *i).str(); diff --git a/source/sourcepackage.cpp b/source/sourcepackage.cpp index 4f42051..f59b353 100644 --- a/source/sourcepackage.cpp +++ b/source/sourcepackage.cpp @@ -181,7 +181,7 @@ void SourcePackage::init_config() void SourcePackage::create_build_info() { - build_info.add(builder.get_current_arch().get_build_info()); + build_info.update_from(builder.get_current_arch().get_build_info()); // XXX Currently, a package-specific settings will override cmdline. This might or might not be desirable. const StringList &warnings = builder.get_warnings(); @@ -216,7 +216,7 @@ void SourcePackage::create_build_info() for(ConditionList::iterator i=conditions.begin(); i!=conditions.end(); ++i) if(i->eval()) - build_info.add(i->get_build_info()); + build_info.update_from(i->get_build_info()); build_info.unique();