]> git.tdb.fi Git - builder.git/blobdiff - source/buildinfo.cpp
Add comments
[builder.git] / source / buildinfo.cpp
index f96820baee83f3886e33189d5900a1a17d346daa..de111e935303bfc2c055fd3617dface673cbd4d3 100644 (file)
@@ -3,6 +3,9 @@
 
 using namespace Msp;
 
+/**
+Adds another BuildInfo to the end of this one.
+*/
 void BuildInfo::add(const BuildInfo &bi)
 {
        cflags.insert(cflags.end(), bi.cflags.begin(), bi.cflags.end());
@@ -13,6 +16,9 @@ void BuildInfo::add(const BuildInfo &bi)
        libs.insert(libs.end(), bi.libs.begin(), bi.libs.end());
 }
 
+/**
+Makes sure there are no duplicate entries in the lists.
+*/
 void BuildInfo::unique()
 {
        unique(cflags);
@@ -23,6 +29,10 @@ void BuildInfo::unique()
        unique(libs);
 }
 
+/**
+Removes any duplicate entries from a list, leaving only the first one.  The
+order of other elements is preserved.  O(n²) efficiency.
+*/
 void BuildInfo::unique(StringList &l)
 {
        StringList l2;