summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2014-10-10 17:13:57 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-11 00:14:14 +0000
commit254bd40b3f63b8d1e484a5c88a2255681ea54e45 (patch)
treec75dfd0f1160ba33aab3cdef30fbbcca8b2bce46 /chrome/browser/profiles
parent45097b2058e1a0d5049c9b7789a91aa9ea4f09ae (diff)
downloadchromium_src-254bd40b3f63b8d1e484a5c88a2255681ea54e45.zip
chromium_src-254bd40b3f63b8d1e484a5c88a2255681ea54e45.tar.gz
chromium_src-254bd40b3f63b8d1e484a5c88a2255681ea54e45.tar.bz2
Align base::hash_map with C++11, part 1.
C++11's std::hash provides a default hash for T* that hashes by pointer value. So does MSVC's stdext::hash_value, but not GCC's __gnu_cxx::hash (and STLPort's std::hash). To align non-MSVC with both MSVC and the standard, provide a default hash for pointers. This removes a lot of GCC-specific hash definitions. Confusingly, all three provide a default hash for const char * that hashes as C string, while not changing their equality. This CL does not change this on any platform. BUG=420242 Review URL: https://codereview.chromium.org/630503002 Cr-Commit-Position: refs/heads/master@{#299217}
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index d779b27..b78b8bb 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -407,17 +407,4 @@ struct ProfileCompare {
bool operator()(Profile* a, Profile* b) const;
};
-#if defined(COMPILER_GCC)
-namespace BASE_HASH_NAMESPACE {
-
-template<>
-struct hash<Profile*> {
- std::size_t operator()(Profile* const& p) const {
- return reinterpret_cast<std::size_t>(p);
- }
-};
-
-} // namespace BASE_HASH_NAMESPACE
-#endif
-
#endif // CHROME_BROWSER_PROFILES_PROFILE_H_