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

Unified Diff: net/quic/core/quic_ack_listener_interface.cc

Issue 2588043002: Pass value and use std::move instead of const reference for ack listeners. (Closed)
Patch Set: Created 4 years 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/quic/core/quic_ack_listener_interface.h ('k') | net/quic/core/quic_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_ack_listener_interface.cc
diff --git a/net/quic/core/quic_ack_listener_interface.cc b/net/quic/core/quic_ack_listener_interface.cc
index 07700f09435ab442d2fe1ab68c3cea81470025b2..e599d594e9576d95c2c718773153151a5e73e424 100644
--- a/net/quic/core/quic_ack_listener_interface.cc
+++ b/net/quic/core/quic_ack_listener_interface.cc
@@ -7,11 +7,9 @@
namespace net {
AckListenerWrapper::AckListenerWrapper(
- const scoped_refptr<QuicAckListenerInterface>& listener,
+ scoped_refptr<QuicAckListenerInterface> listener,
QuicPacketLength data_length)
- : ack_listener(listener), length(data_length) {
- DCHECK(listener != nullptr);
-}
+ : ack_listener(std::move(listener)), length(data_length) {}
AckListenerWrapper::AckListenerWrapper(const AckListenerWrapper& other) =
default;
« no previous file with comments | « net/quic/core/quic_ack_listener_interface.h ('k') | net/quic/core/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698