Minor cleanup: IWYU, etc.

PiperOrigin-RevId: 625401573
pull/16508/head
Protobuf Team Bot 10 months ago committed by Copybara-Service
parent f46a00f278
commit c7b9d540bd
  1. 8
      src/google/protobuf/dynamic_message.cc
  2. 9
      src/google/protobuf/dynamic_message.h
  3. 3
      src/google/protobuf/dynamic_message_unittest.cc

@ -43,9 +43,13 @@
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <memory>
#include <new>
#include <string>
#include "absl/log/absl_check.h"
#include "google/protobuf/arenastring.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/descriptor.pb.h"
@ -53,9 +57,7 @@
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/map_field.h"
#include "google/protobuf/map_field_inl.h"
#include "google/protobuf/map_type_handler.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/message_lite.h"
#include "google/protobuf/repeated_field.h"
#include "google/protobuf/unknown_field_set.h"
#include "google/protobuf/wire_format.h"

@ -16,13 +16,16 @@
#define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__
#include <algorithm>
#include <memory>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/log/absl_log.h"
#include "absl/synchronization/mutex.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/message.h"
#include "google/protobuf/port.h"
#include "google/protobuf/reflection.h"
#include "google/protobuf/repeated_field.h"
@ -140,7 +143,7 @@ class PROTOBUF_EXPORT DynamicMapSorter {
std::stable_sort(result.begin(), result.end(), comparator);
// Complain if the keys aren't in ascending order.
#ifndef NDEBUG
for (size_t j = 1; j < static_cast<size_t>(map_size); j++) {
for (size_t j = 1; j < static_cast<size_t>(map_size); ++j) {
if (!comparator(result[j - 1], result[j])) {
ABSL_LOG(ERROR) << (comparator(result[j], result[j - 1])
? "internal error in map key sorting"

@ -19,11 +19,12 @@
#include "google/protobuf/dynamic_message.h"
#include <cstddef>
#include <memory>
#include <string>
#include <vector>
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/testing/googletest.h"
#include <gtest/gtest.h>
#include "google/protobuf/descriptor.h"
#include "google/protobuf/test_util.h"

Loading…
Cancel
Save