commit | a48434493d69085aa6fc0c002180ace555cad592 | [log] [tgz] |
---|---|---|
author | Nico Weber <nicolasweber@gmx.de> | Mon Sep 07 23:52:25 2015 |
committer | Nico Weber <nicolasweber@gmx.de> | Mon Sep 07 23:52:25 2015 |
tree | ae5a92d00f09eb67e353b30fb2d71539e7161201 | |
parent | cb17a11d21b0c46c062c4dbccc11b26a55f3a50a [diff] | |
parent | 41d2b035e2387dcfbf5b268ffb3da446b28186ff [diff] |
Merge pull request #1014 from moroten/optimize-stringpiece Optimize StringPiece hash map
diff --git a/src/hash_map.h b/src/hash_map.h index abdba92..a91aeb9 100644 --- a/src/hash_map.h +++ b/src/hash_map.h
@@ -76,7 +76,7 @@ return MurmurHash2(key.str_, key.len_); } bool operator()(const StringPiece& a, const StringPiece& b) const { - int cmp = strncmp(a.str_, b.str_, min(a.len_, b.len_)); + int cmp = memcmp(a.str_, b.str_, min(a.len_, b.len_)); if (cmp < 0) { return true; } else if (cmp > 0) {