From a6083e672f463e0da0af5f28bdc849dfb036bac3 Mon Sep 17 00:00:00 2001 From: Hong Shin Date: Mon, 17 Jul 2023 09:18:23 -0700 Subject: [PATCH] Cleanup ZeroCopyInputStream and ZeroCopyOutputStream - Expunge unnecessary forward declarations - Delete move constructor and move assignment PiperOrigin-RevId: 548711824 --- src/google/protobuf/io/zero_copy_stream.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/google/protobuf/io/zero_copy_stream.h b/src/google/protobuf/io/zero_copy_stream.h index 8fac9f126f..595fc6167f 100644 --- a/src/google/protobuf/io/zero_copy_stream.h +++ b/src/google/protobuf/io/zero_copy_stream.h @@ -119,18 +119,17 @@ namespace google { namespace protobuf { namespace io { -// Defined in this file. -class ZeroCopyInputStream; -class ZeroCopyOutputStream; - // Abstract interface similar to an input stream but designed to minimize // copying. class PROTOBUF_EXPORT ZeroCopyInputStream { public: - ZeroCopyInputStream() {} + ZeroCopyInputStream() = default; + virtual ~ZeroCopyInputStream() = default; + ZeroCopyInputStream(const ZeroCopyInputStream&) = delete; ZeroCopyInputStream& operator=(const ZeroCopyInputStream&) = delete; - virtual ~ZeroCopyInputStream() {} + ZeroCopyInputStream(ZeroCopyInputStream&&) = delete; + ZeroCopyInputStream& operator=(ZeroCopyInputStream&&) = delete; // Obtains a chunk of data from the stream. //