X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fbuildinfo.cpp;h=0ac20c91e0fce90f67caa5d7f07d0739215d094c;hb=3e8bf5032e744b5fc3e7680af48f2abacc67addc;hp=9ad0a557706b687d2a2775044c8fc55e6386019f;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/buildinfo.cpp b/source/buildinfo.cpp index 9ad0a55..0ac20c9 100644 --- a/source/buildinfo.cpp +++ b/source/buildinfo.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #include "buildinfo.h" @@ -21,7 +14,7 @@ void unique(StringList &l) for(StringList::iterator j=i; j!=l.end();) { if(j!=i && *j==*i) - j=l.erase(j); + j = l.erase(j); else ++j; } @@ -30,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()); @@ -52,23 +45,23 @@ void BuildInfo::unique() for(StringList::iterator i=warnings.begin(); i!=warnings.end(); ++i) { - bool flag=i->compare(0, 3, "no-"); + bool flag = i->compare(0, 3, "no-"); - string warn=(flag ? *i : i->substr(3)); - string no_warn="no-"+warn; + string warn = (flag ? *i : i->substr(3)); + string no_warn = "no-"+warn; for(StringList::iterator j=i; j!=warnings.end();) { if(j!=i && (*j==warn || *j==no_warn)) { - flag=(*j==warn); - j=warnings.erase(j); + flag = (*j==warn); + j = warnings.erase(j); } else ++j; } - *i=(flag ? warn : no_warn); + *i = (flag ? warn : no_warn); } }