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

Unified Diff: cc/surfaces/surface_id.h

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: 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: cc/surfaces/surface_id.h
diff --git a/cc/surfaces/surface_id.h b/cc/surfaces/surface_id.h
index 0ade6ab9135928c95d3a1e7cb9d70e4ef81e2078..795b3a927e1f47726e92e92d7a4b4823f7d22e0f 100644
--- a/cc/surfaces/surface_id.h
+++ b/cc/surfaces/surface_id.h
@@ -8,7 +8,7 @@
#include <stddef.h>
#include <stdint.h>
-#include "base/containers/hash_tables.h"
+#include <functional>
namespace cc {
@@ -33,15 +33,12 @@ inline bool operator<(const SurfaceId& a, const SurfaceId& b) {
return a.id < b.id;
}
-} // namespace cc
-
-namespace BASE_HASH_NAMESPACE {
-template <>
-struct hash<cc::SurfaceId> {
- size_t operator()(cc::SurfaceId key) const {
- return hash<uint64_t>()(key.id);
+struct SurfaceIdHash {
+ size_t operator()(SurfaceId key) const {
+ return std::hash<uint64_t>()(key.id);
}
};
-} // namespace BASE_HASH_NAMESPACE
+
+} // namespace cc
#endif // CC_SURFACES_SURFACE_ID_H_

Powered by Google App Engine
This is Rietveld 408576698