Minor cleanup: IWYU, etc.

PiperOrigin-RevId: 608775453
pull/15900/head
Protobuf Team Bot 9 months ago committed by Copybara-Service
parent bcb1d8cfbd
commit b653a64514
  1. 8
      src/google/protobuf/compiler/cpp/field.h

@ -12,14 +12,17 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_CPP_FIELD_H__
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/log/absl_check.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "absl/types/span.h"
#include "google/protobuf/compiler/cpp/helpers.h"
#include "google/protobuf/compiler/cpp/options.h"
#include "google/protobuf/descriptor.h"
@ -507,7 +510,8 @@ class FieldGeneratorTable {
const FieldGenerator& get(const FieldDescriptor* field) const {
ABSL_CHECK_EQ(field->containing_type(), descriptor_);
return fields_[field->index()];
ABSL_DCHECK_GE(field->index(), 0);
return fields_[static_cast<size_t>(field->index())];
}
private:

Loading…
Cancel
Save