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

Unified Diff: content/renderer/pepper/v8_var_converter.cc

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
Index: content/renderer/pepper/v8_var_converter.cc
diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc
index 3c3503046a9ab3dbc2dfba51a9fcfbd7e2add162..215ec389bee611d31ce610a6a74ea85644717a28 100644
--- a/content/renderer/pepper/v8_var_converter.cc
+++ b/content/renderer/pepper/v8_var_converter.cc
@@ -47,21 +47,16 @@ struct HashedHandle {
HashedHandle(v8::Handle<v8::Object> h) : handle(h) {}
size_t hash() const { return handle->GetIdentityHash(); }
bool operator==(const HashedHandle& h) const { return handle == h.handle; }
- bool operator<(const HashedHandle& h) const { return hash() < h.hash(); }
davidben 2014/10/02 22:53:59 I left the other operator<'s in place because it w
v8::Handle<v8::Object> handle;
};
} // namespace
namespace BASE_HASH_NAMESPACE {
-#if defined(COMPILER_GCC)
template <>
struct hash<HashedHandle> {
size_t operator()(const HashedHandle& handle) const { return handle.hash(); }
};
-#elif defined(COMPILER_MSVC)
-inline size_t hash_value(const HashedHandle& handle) { return handle.hash(); }
-#endif
} // namespace BASE_HASH_NAMESPACE
namespace content {

Powered by Google App Engine
This is Rietveld 408576698