summaryrefslogtreecommitdiff
path: root/hadori.C
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2011-12-02 19:17:47 +0100
committerTimo Weingärtner <timo@tiwe.de>2011-12-02 19:17:47 +0100
commit091b33363d0c067c9071414f97fda16102bc065b (patch)
treeadaf4d9fd78681ac1e0897f90952e288684541b0 /hadori.C
parent1c803dcad160e85fe4b8d46b322374283c0edd89 (diff)
downloadhadori-091b33363d0c067c9071414f97fda16102bc065b.tar.gz
use unordered_map for kept and to_link
sorting is not needed
Diffstat (limited to 'hadori.C')
-rw-r--r--hadori.C5
1 files changed, 3 insertions, 2 deletions
diff --git a/hadori.C b/hadori.C
index 3564c04..1e4ea7b 100644
--- a/hadori.C
+++ b/hadori.C
@@ -5,6 +5,7 @@ namespace po = boost::program_options;
#include <vector>
#include <queue>
#include <map>
+#include <unordered_map>
#include <iostream>
#include <sstream>
@@ -44,8 +45,8 @@ void do_link (inode const & i, std::string const & other) {
}
void handle_file(std::string const & path, struct stat const & s) {
- static std::map<ino_t, inode const> kept;
- static std::map<ino_t, ino_t> to_link;
+ static std::unordered_map<ino_t, inode const> kept;
+ static std::unordered_map<ino_t, ino_t> to_link;
static std::multimap<off_t, ino_t> sizes;
debug << "examining " << path << std::endl;