From f76b28e535f5bbdca33d4b843ba048342858d0d4 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Wed, 17 Apr 2024 16:09:05 -0700 Subject: [PATCH] Minor cleanup: IWYU, clang-tidy, etc. PiperOrigin-RevId: 625836385 --- src/google/protobuf/has_bits.h | 4 +--- src/google/protobuf/message_lite.cc | 5 ++--- src/google/protobuf/message_lite.h | 8 ++++---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/google/protobuf/has_bits.h b/src/google/protobuf/has_bits.h index 93cda15192..e0019e2551 100644 --- a/src/google/protobuf/has_bits.h +++ b/src/google/protobuf/has_bits.h @@ -11,11 +11,9 @@ #include #include #include +#include #include -#include "google/protobuf/stubs/common.h" -#include "google/protobuf/port.h" - // Must be included last. #include "google/protobuf/port_def.inc" diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc index 11dc247c8e..103549e7d9 100644 --- a/src/google/protobuf/message_lite.cc +++ b/src/google/protobuf/message_lite.cc @@ -20,8 +20,6 @@ #include #include -#include "absl/base/dynamic_annotations.h" -#include "absl/base/optimization.h" #include "absl/log/absl_check.h" #include "absl/log/absl_log.h" #include "absl/strings/cord.h" @@ -29,14 +27,15 @@ #include "absl/strings/internal/resize_uninitialized.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "absl/synchronization/mutex.h" #include "absl/types/optional.h" +#include "absl/types/span.h" #include "google/protobuf/arena.h" #include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/io/zero_copy_stream.h" #include "google/protobuf/io/zero_copy_stream_impl.h" #include "google/protobuf/io/zero_copy_stream_impl_lite.h" +#include "google/protobuf/metadata_lite.h" #include "google/protobuf/parse_context.h" diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index b47f40725c..1b85aa0c65 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -16,13 +16,13 @@ #ifndef GOOGLE_PROTOBUF_MESSAGE_LITE_H__ #define GOOGLE_PROTOBUF_MESSAGE_LITE_H__ -#include #include +#include +#include #include #include -#include "google/protobuf/stubs/common.h" -#include "absl/base/call_once.h" +#include "absl/base/attributes.h" #include "absl/log/absl_check.h" #include "absl/strings/cord.h" #include "absl/strings/string_view.h" @@ -208,7 +208,7 @@ PROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const std::string& str); // the internal library are allowed to create subclasses. class PROTOBUF_EXPORT MessageLite { public: - constexpr MessageLite() {} + constexpr MessageLite() = default; MessageLite(const MessageLite&) = delete; MessageLite& operator=(const MessageLite&) = delete; virtual ~MessageLite() = default;