Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: src/base/functional.h

Issue 632713002: Don't use identity as hash function for integers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/base/functional.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/functional.h
diff --git a/src/base/functional.h b/src/base/functional.h
index 60f93ddad5dfbac1059c32d1f58cbac0402258ef..d815c7214226cfd2e45c002144dac486d39ab59f 100644
--- a/src/base/functional.h
+++ b/src/base/functional.h
@@ -76,11 +76,11 @@ inline size_t hash_combine(T const& v, Ts const&... vs) {
V8_BASE_HASH_VALUE_TRIVIAL(bool)
V8_BASE_HASH_VALUE_TRIVIAL(unsigned char)
V8_BASE_HASH_VALUE_TRIVIAL(unsigned short) // NOLINT(runtime/int)
-V8_BASE_HASH_VALUE_TRIVIAL(unsigned int)
#undef V8_BASE_HASH_VALUE_TRIVIAL
-size_t hash_value(unsigned long v); // NOLINT(runtime/int)
-size_t hash_value(unsigned long long v); // NOLINT(runtime/int)
+size_t hash_value(unsigned int);
+size_t hash_value(unsigned long); // NOLINT(runtime/int)
+size_t hash_value(unsigned long long); // NOLINT(runtime/int)
#define V8_BASE_HASH_VALUE_SIGNED(type) \
inline size_t hash_value(signed type v) { \
« no previous file with comments | « no previous file | src/base/functional.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698