diff options
author | pg <pg@yandex-team.com> | 2023-02-08 14:47:59 +0300 |
---|---|---|
committer | pg <pg@yandex-team.com> | 2023-02-08 14:47:59 +0300 |
commit | 2999295666a93b51c9226cee88ea70b996d43727 (patch) | |
tree | 6cd1a5290a2653689a33c6269c0eebb7dd05729d /contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc | |
parent | e615f3f87f0fc3dcc0d45c304883339ab1eab8c1 (diff) | |
download | ydb-2999295666a93b51c9226cee88ea70b996d43727.tar.gz |
3.19.0
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc')
-rw-r--r-- | contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc index 6e3f174c5b..681e16a947 100644 --- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -155,8 +155,8 @@ void FileGenerator::GenerateMacroUndefs(io::Printer* printer) { for (int i = 0; i < fields.size(); i++) { const TProtoStringType& name = fields[i]->name(); static const char* kMacroNames[] = {"major", "minor"}; - for (int i = 0; i < GOOGLE_ARRAYSIZE(kMacroNames); ++i) { - if (name == kMacroNames[i]) { + for (int j = 0; j < GOOGLE_ARRAYSIZE(kMacroNames); ++j) { + if (name == kMacroNames[j]) { names_to_undef.push_back(name); break; } @@ -1211,7 +1211,8 @@ void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { IncludeFile("net/proto2/io/public/coded_stream.h", printer); IncludeFile("net/proto2/public/arena.h", printer); IncludeFile("net/proto2/public/arenastring.h", printer); - if (options_.force_inline_string || options_.profile_driven_inline_string) { + if ((options_.force_inline_string || options_.profile_driven_inline_string) && + !options_.opensource_runtime) { IncludeFile("net/proto2/public/inlined_string_field.h", printer); } if (HasSimpleBaseClasses(file_, options_)) { |