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

Unified Diff: media/blink/multibuffer.h

Issue 1502373009: Allow std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, more HashPair -> HashInts Created 4 years, 11 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: media/blink/multibuffer.h
diff --git a/media/blink/multibuffer.h b/media/blink/multibuffer.h
index 64789142c7b81bf5136a3e5490b96c8b6d38065f..cecca4a2c2f988328607a4a26def8620bec9a91f 100644
--- a/media/blink/multibuffer.h
+++ b/media/blink/multibuffer.h
@@ -15,6 +15,7 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
+#include "base/hash.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -43,15 +44,7 @@ namespace BASE_HASH_NAMESPACE {
template <>
struct hash<media::MultiBufferGlobalBlockId> {
std::size_t operator()(const media::MultiBufferGlobalBlockId& key) const {
-// It would be nice if we could use intptr_t instead of int64_t here, but
-// on some platforms, int64_t is declared as "long" which doesn't match
-// any of the HashPair() functions. This leads to a compile error since
-// the compiler can't decide which HashPair() function to call.
-#if defined(ARCH_CPU_64_BITS)
- return base::HashPair(reinterpret_cast<int64_t>(key.first), key.second);
-#else
- return base::HashPair(reinterpret_cast<int32_t>(key.first), key.second);
-#endif
+ return base::HashInts(reinterpret_cast<uintptr_t>(key.first), key.second);
}
};
« no previous file with comments | « gpu/command_buffer/service/framebuffer_completeness_cache.h ('k') | net/base/network_change_notifier_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698