[ObjC] Fix a clang tidy warning about const usage and make the FileGenerator const.

PiperOrigin-RevId: 491512974
pull/11077/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent afb5a268f1
commit 726aace07c
  1. 2
      src/google/protobuf/compiler/objectivec/file.cc
  2. 2
      src/google/protobuf/compiler/objectivec/file.h
  3. 2
      src/google/protobuf/compiler/objectivec/generator.cc

@ -205,7 +205,7 @@ FileGenerator::CommonState::CollectMinimalFileDepsContainingExtensionsInternal(
// There are comments about what the expected code should be line and limited
// testing objectivec/Tests/GPBUnittestProtos2.m around compilation (#imports
// specifically).
const std::vector<const FileDescriptor*>
std::vector<const FileDescriptor*>
FileGenerator::CommonState::CollectMinimalFileDepsContainingExtensions(
const FileDescriptor* file) {
absl::flat_hash_set<const FileDescriptor*> min_deps =

@ -56,7 +56,7 @@ class FileGenerator {
struct CommonState {
CommonState() = default;
const std::vector<const FileDescriptor*>
std::vector<const FileDescriptor*>
CollectMinimalFileDepsContainingExtensions(const FileDescriptor* file);
private:

@ -285,7 +285,7 @@ bool ObjectiveCGenerator::GenerateAll(
FileGenerator::CommonState state;
for (int i = 0; i < files.size(); i++) {
const FileDescriptor* file = files[i];
FileGenerator file_generator(file, generation_options, state);
const FileGenerator file_generator(file, generation_options, state);
std::string filepath = FilePath(file);
// Generate header.

Loading…
Cancel
Save