]> git.tdb.fi Git - builder.git/commitdiff
Add paths to beginning when merging BuildInfo
authorMikko Rasa <tdb@tdb.fi>
Fri, 3 Oct 2014 21:53:09 +0000 (00:53 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 3 Oct 2014 21:53:09 +0000 (00:53 +0300)
This is more consistent with how scalars are handled, since earlier
values take predecence.

source/buildinfo.cpp

index 5ea1b344069c034c07636b3e0a848b05fe64b9b7..d346fe693299ca520fd658967581514bbb187335 100644 (file)
@@ -48,16 +48,16 @@ void BuildInfo::update_from(const BuildInfo &bi, UpdateLevel level)
 {
        for(DefineMap::const_iterator i=bi.defines.begin(); i!=bi.defines.end(); ++i)
                defines[i->first] = i->second;
-       incpath.insert(incpath.end(), bi.incpath.begin(), bi.incpath.end());
+       incpath.insert(incpath.begin(), bi.incpath.begin(), bi.incpath.end());
        if(level!=CHAINED)
        {
-               libpath.insert(libpath.end(), bi.libpath.begin(), bi.libpath.end());
-               libs.insert(libs.end(), bi.libs.begin(), bi.libs.end());
+               libpath.insert(libpath.begin(), bi.libpath.begin(), bi.libpath.end());
+               libs.insert(libs.begin(), bi.libs.begin(), bi.libs.end());
        }
        threads = bi.threads;
        if(level==LOCAL)
        {
-               local_incpath.insert(local_incpath.end(), bi.local_incpath.begin(), bi.local_incpath.end());
+               local_incpath.insert(local_incpath.begin(), bi.local_incpath.begin(), bi.local_incpath.end());
                libmode = bi.libmode;
                for(LibModeMap::const_iterator i=bi.libmodes.begin(); i!=bi.libmodes.end(); ++i)
                        libmodes[i->first] = i->second;