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

Unified Diff: net/quic/quic_blocked_writer_interface.h

Issue 1666843002: Refactor StringPiece hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort includes. Created 4 years, 10 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
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/spdy/hpack/hpack_header_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_blocked_writer_interface.h
diff --git a/net/quic/quic_blocked_writer_interface.h b/net/quic/quic_blocked_writer_interface.h
index 78a270af12f685636bf3bf495b5965e3a9ca6ae6..a3a2622a599d561a226371b6b888b2b3e5a9903f 100644
--- a/net/quic/quic_blocked_writer_interface.h
+++ b/net/quic/quic_blocked_writer_interface.h
@@ -24,20 +24,15 @@ class NET_EXPORT_PRIVATE QuicBlockedWriterInterface {
virtual void OnCanWrite() = 0;
};
-} // namespace net
-
-#if defined(COMPILER_GCC)
-namespace BASE_HASH_NAMESPACE {
// Hash pointers as if they were int's, but bring more entropy to the lower
// bits.
-template <>
-struct hash<net::QuicBlockedWriterInterface*> {
+struct QuicBlockedWriterInterfacePtrHash {
std::size_t operator()(const net::QuicBlockedWriterInterface* ptr) const {
size_t k = reinterpret_cast<size_t>(ptr);
return k + (k >> 6);
}
};
-}
-#endif
+
+} // namespace net
#endif // NET_QUIC_QUIC_BLOCKED_WRITER_INTERFACE_H_
« no previous file with comments | « net/http/http_server_properties_impl.h ('k') | net/spdy/hpack/hpack_header_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698