diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
commit | 75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch) | |
tree | c6274cc10caab08349b5585206034f41ca4a575f /src/libstore/references.cc | |
parent | aab88127321344d5818d823bff515d127108d058 (diff) |
* Use a proper namespace.
* Optimise header file usage a bit. * Compile the parser as C++.
Diffstat (limited to 'src/libstore/references.cc')
-rw-r--r-- | src/libstore/references.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libstore/references.cc b/src/libstore/references.cc index d67e5b9dcc82..aba4ef01072f 100644 --- a/src/libstore/references.cc +++ b/src/libstore/references.cc @@ -1,3 +1,7 @@ +#include "references.hh" +#include "hash.hh" +#include "util.hh" + #include <cerrno> #include <map> @@ -7,8 +11,8 @@ #include <dirent.h> #include <fcntl.h> -#include "references.hh" -#include "hash.hh" + +namespace nix { static unsigned int refLength = 32; /* characters */ @@ -90,7 +94,7 @@ void checkPath(const string & path, PathSet scanForReferences(const string & path, const PathSet & paths) { - map<string, Path> backMap; + std::map<string, Path> backMap; StringSet ids; StringSet seen; @@ -114,10 +118,13 @@ PathSet scanForReferences(const string & path, const PathSet & paths) PathSet found; for (StringSet::iterator i = seen.begin(); i != seen.end(); i++) { - map<string, Path>::iterator j; + std::map<string, Path>::iterator j; if ((j = backMap.find(*i)) == backMap.end()) abort(); found.insert(j->second); } return found; } + + +} |