|
|
|
@ -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: |
|
|
|
|