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

Unified Diff: tools/gn/unique_vector.h

Issue 612323010: Align base::hash_map with C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try a different tack for C++ insanity 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
« content/renderer/pepper/v8_var_converter.cc ('K') | « tools/gn/target.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/unique_vector.h
diff --git a/tools/gn/unique_vector.h b/tools/gn/unique_vector.h
index 16f797efe43fb061b8b0cf09f27afd2f5230d98a..f5182d759844adf8b4a6e5dfd85dfaf2f6db8f23 100644
--- a/tools/gn/unique_vector.h
+++ b/tools/gn/unique_vector.h
@@ -63,14 +63,8 @@ class UniquifyRef {
private:
void FillHashValue() {
-#if defined(COMPILER_GCC)
BASE_HASH_NAMESPACE::hash<T> h;
hash_val_ = h(value());
-#elif defined(COMPILER_MSVC)
- hash_val_ = BASE_HASH_NAMESPACE::hash_value(value());
-#else
- #error write me
-#endif // COMPILER...
}
// When non-null, points to the object.
@@ -97,18 +91,11 @@ template<typename T> inline bool operator<(const UniquifyRef<T>& a,
namespace BASE_HASH_NAMESPACE {
-#if defined(COMPILER_GCC)
template<typename T> struct hash< internal::UniquifyRef<T> > {
std::size_t operator()(const internal::UniquifyRef<T>& v) const {
return v.hash_val();
}
};
-#elif defined(COMPILER_MSVC)
-template<typename T>
-inline size_t hash_value(const internal::UniquifyRef<T>& v) {
- return v.hash_val();
-}
-#endif // COMPILER...
} // namespace BASE_HASH_NAMESPACE
« content/renderer/pepper/v8_var_converter.cc ('K') | « tools/gn/target.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698