summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-01-04 18:23:17 (GMT)
committerNico Weber <nicolasweber@gmx.de>2015-01-04 18:23:17 (GMT)
commitda94924bddd2554957067c06fb10ff2a8eb58824 (patch)
treeeddf4c097ef6244e31eb49c2b059addf014fa27d
parent2e922960014e43dd63bd9f8384836d7fd191d1ff (diff)
parent88379d989d2a57cd46b2389751590b3ddc4ebef2 (diff)
downloadNinja-da94924bddd2554957067c06fb10ff2a8eb58824.zip
Ninja-da94924bddd2554957067c06fb10ff2a8eb58824.tar.gz
Ninja-da94924bddd2554957067c06fb10ff2a8eb58824.tar.bz2
Merge pull request #889 from nico/del2
Try to simplify d1e6a29 a bit.
-rw-r--r--src/hash_map.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash_map.h b/src/hash_map.h
index b57a631..abdba92 100644
--- a/src/hash_map.h
+++ b/src/hash_map.h
@@ -57,10 +57,10 @@ namespace std {
template<>
struct hash<StringPiece> {
typedef StringPiece argument_type;
- typedef std::size_t result_type;
+ typedef size_t result_type;
- result_type operator()(argument_type const& s) const {
- return MurmurHash2(s.str_, s.len_);
+ size_t operator()(StringPiece key) const {
+ return MurmurHash2(key.str_, key.len_);
}
};
}