]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.cpp
Style update: add spaces around assignment operators
[builder.git] / source / analyzer.cpp
index eae9de75a182c5c83c4b36850464634e4b19e11b..f8af44ff9a6295497102bd80989ef3f64c24c096 100644 (file)
@@ -46,9 +46,9 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
        if(mode!=REBUILD && mode!=ALLDEPS)
        {
                // Skip trivial targets
-               if(ObjectFile *obj=dynamic_cast<ObjectFile *>(&tgt))
+               if(ObjectFile *obj = dynamic_cast<ObjectFile *>(&tgt))
                        return build_depend_table(obj->get_source(), depth);
-               else if(Install *inst=dynamic_cast<Install *>(&tgt))
+               else if(Install *inst = dynamic_cast<Install *>(&tgt))
                        return build_depend_table(inst->get_source(), depth);
        }
        else if(mode==REBUILD && !tgt.get_rebuild())
@@ -60,12 +60,12 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
 
        string fn;
        if(full_paths)
-               fn=tgt.get_name();
+               fn = tgt.get_name();
        else
-               fn=FS::basename(tgt.get_name());
+               fn = FS::basename(tgt.get_name());
        row.push_back(string(depth*2, ' ')+fn);
 
-       const Package *pkg=tgt.get_package();
+       const Package *pkg = tgt.get_package();
        if(pkg)
                row.push_back(pkg->get_name());
        else
@@ -85,7 +85,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
 
        if(!max_depth || depth<max_depth-1)
        {
-               const TargetList &depends=tgt.get_depends();
+               const TargetList &depends = tgt.get_depends();
                //XXX If we want to sort the targets, we need to take the value of full_paths into account
                //depends.sort(target_order);
                for(TargetList::const_iterator i=depends.begin(); i!=depends.end(); ++i)
@@ -103,7 +103,7 @@ void Analyzer::print_table() const
                if(col_width.size()<i->size())
                        col_width.resize(i->size(), 0);
                for(unsigned j=0; j<i->size(); ++j)
-                       col_width[j]=max(col_width[j], (*i)[j].size());
+                       col_width[j] = max(col_width[j], (*i)[j].size());
        }
 
        for(Table::const_iterator i=table.begin(); i!=table.end(); ++i)
@@ -112,8 +112,8 @@ void Analyzer::print_table() const
                for(unsigned j=0; j<i->size(); ++j)
                {
                        if(j>0)
-                               line+="  ";
-                       line+=lexical_cast((*i)[j], Fmt("%-s").width(col_width[j]));
+                               line += "  ";
+                       line += lexical_cast((*i)[j], Fmt("%-s").width(col_width[j]));
                }
                IO::print("%s\n", line);
        }