diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-11-21 23:35:13 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-11-21 23:35:13 (GMT) |
commit | 4843022bf4755d7fafe58faee430a6f62f51ca8f (patch) | |
tree | 34ce84fbfdbfb720b4aae4ae575f296341bbccab /src/handle_dep.cc | |
parent | e31bb0f60312e692f5ef57fd3823e413cc8a669c (diff) | |
parent | b211fe5158160910c73397bc401fb846c45a7295 (diff) |
Merge remote branch 'upstream/master' into cakebaby
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; |