From 81a31c6996baf997da4a5387f2e004d69f299036 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 9 Dec 2023 09:17:55 -0800 Subject: [PATCH] quic: address review comments --- src/dataqueue/queue.cc | 4 ++-- src/quic/streams.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dataqueue/queue.cc b/src/dataqueue/queue.cc index e6b7a4893b4bf5..c3de4eb570beab 100644 --- a/src/dataqueue/queue.cc +++ b/src/dataqueue/queue.cc @@ -176,10 +176,10 @@ class DataQueueImpl final : public DataQueue, void NotifyBackpressure(size_t amount) { if (idempotent_) return; - for (auto listener : backpressure_listeners_) listener->EntryRead(amount); + for (auto& listener : backpressure_listeners_) listener->EntryRead(amount); } - bool HasBackpressureListeners() const { + bool HasBackpressureListeners() const noexcept { return !backpressure_listeners_.empty(); } diff --git a/src/quic/streams.cc b/src/quic/streams.cc index bde376899dfaa7..4cca65f56d900e 100644 --- a/src/quic/streams.cc +++ b/src/quic/streams.cc @@ -804,7 +804,7 @@ BaseObjectPtr Stream::get_reader() { void Stream::set_final_size(uint64_t final_size) { DCHECK_IMPLIES(state_->fin_received == 1, - final_size <= stats_.Get<&Stats::final_size>()); + final_size <= STAT_GET(Stats, final_size)); state_->fin_received = 1; STAT_SET(Stats, final_size, final_size); }