diff options
author | Marius Kintel <marius@kintel.net> | 2011-11-21 20:00:44 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-11-21 20:00:44 (GMT) |
commit | 077c144c867d07eced8b50e769089dcbfbfc96b9 (patch) | |
tree | f9fe35cb249180e5df6a543c72ed072a639bd3a7 /src/handle_dep.cc | |
parent | 00cff177efaab72a58045cb4593ea9a3293853d7 (diff) | |
parent | cabff81c70f7d9083c47f5be8b5bc071168e6b35 (diff) |
Merge branch 'cache'
Diffstat (limited to 'src/handle_dep.cc')
-rw-r--r-- | src/handle_dep.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/handle_dep.cc b/src/handle_dep.cc index 2a05b4a..d4380f5 100644 --- a/src/handle_dep.cc +++ b/src/handle_dep.cc @@ -1,13 +1,14 @@ #include "handle_dep.h" -#include "myqhash.h" #include <string> #include <sstream> #include <QString> #include <QDir> #include <QSet> #include <stdlib.h> // for system() +#include <boost/unordered_set.hpp> +#include <boost/foreach.hpp> -QSet<std::string> dependencies; +boost::unordered_set<std::string> dependencies; const char *make_command = NULL; void handle_dep(const std::string &filename) @@ -33,9 +34,10 @@ bool write_deps(const std::string &filename, const std::string &output_file) return false; } fprintf(fp, "%s:", output_file.c_str()); - QSetIterator<std::string> i(dependencies); - while (i.hasNext()) - fprintf(fp, " \\\n\t%s", i.next().c_str()); + + BOOST_FOREACH(const std::string &str, dependencies) { + fprintf(fp, " \\\n\t%s", str.c_str()); + } fprintf(fp, "\n"); fclose(fp); return true; |