summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/store.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-09-16 00:14:29 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-09-16 00:20:30 +0200
commitdc20109d55a525ba9772e3fac49e41d28ba39f04 (patch)
tree0e28969a195e6506352fe3f0ae43cb27ba047159 /crawl-ref/source/store.h
parent6ed63208da136e0175866bb8c3a82b64b0b5fdcb (diff)
downloadcrawl-ref-dc20109d55a525ba9772e3fac49e41d28ba39f04.tar.gz
crawl-ref-dc20109d55a525ba9772e3fac49e41d28ba39f04.zip
Revert "Use std::unordered_map instead of std::map -- O(1) vs O(log n), in one place for now."
It appears Apple's gcc-4.0 has problems there, and they don't provide fixes; never versions don't have their patches for ppc SDK. Having O(1) maps would be nice, but I don't think we anywhere use an amount of data where O(log n) makes a real difference. A new case where I wanted a hash table for can be done by hand. This reverts commit 6c9450d3706569e5eedf0cdd7e0327fe8d50612a.
Diffstat (limited to 'crawl-ref/source/store.h')
-rw-r--r--crawl-ref/source/store.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/store.h b/crawl-ref/source/store.h
index 7e32d836ed..2f5d620aa2 100644
--- a/crawl-ref/source/store.h
+++ b/crawl-ref/source/store.h
@@ -8,6 +8,7 @@
#define STORE_H
#include <limits.h>
+#include <map>
#include <string>
#include <vector>
@@ -263,7 +264,7 @@ public:
~CrawlHashTable();
- typedef std::unordered_map<std::string, CrawlStoreValue> hash_map_type;
+ typedef std::map<std::string, CrawlStoreValue> hash_map_type;
typedef hash_map_type::iterator iterator;
typedef hash_map_type::const_iterator const_iterator;