Inline trivial constructors
I was investigating a Chromium merge failure where an unused variable triggered a warning in Chromium but not google3: cl/276485378. It appears that in google3 the compiler will only flag unused variables if they are primitive types, or if the struct/class has an inline constexpr constructor. So I performed a quick audit of our code and made the most obvious examples follow this pattern.
gfe-relnote: inline constructors, no behavior change
PiperOrigin-RevId: 276787382
Change-Id: Ib59b54d390b0e89966d2a8ccac2f4d1eaa478893
diff --git a/quic/core/quic_stream_send_buffer.h b/quic/core/quic_stream_send_buffer.h
index 1bccd0f..a1f7ac7 100644
--- a/quic/core/quic_stream_send_buffer.h
+++ b/quic/core/quic_stream_send_buffer.h
@@ -42,7 +42,8 @@
};
struct QUIC_EXPORT_PRIVATE StreamPendingRetransmission {
- StreamPendingRetransmission(QuicStreamOffset offset, QuicByteCount length)
+ constexpr StreamPendingRetransmission(QuicStreamOffset offset,
+ QuicByteCount length)
: offset(offset), length(length) {}
// Starting offset of this pending retransmission.