diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-06-18 20:45:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-18 20:45:49 -0700 |
commit | 77d41036855c86378061b05e12f5ec84e3de55cc (patch) | |
tree | b7cf248d512c9142be3e7ded421d3e68aeebd184 /src/google/protobuf/compiler/cpp | |
parent | 8af87de949dda877390288ebcdada8c708c4ff8c (diff) | |
parent | 29ad3002cb3490b3fe6cd44eb0ded0f5408f29ba (diff) | |
download | protobuf-77d41036855c86378061b05e12f5ec84e3de55cc.tar.gz protobuf-77d41036855c86378061b05e12f5ec84e3de55cc.tar.bz2 protobuf-77d41036855c86378061b05e12f5ec84e3de55cc.zip |
Merge pull request #4626 from robhancocksed/master
Declare some generated C++ methods as static #4602
Diffstat (limited to 'src/google/protobuf/compiler/cpp')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_file.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc index 42525687..02f360bb 100644 --- a/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -791,7 +791,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // AssignDescriptors(). All later times, waits for the first call to // complete and then returns. printer->Print( - "void protobuf_AssignDescriptors() {\n" + "static void protobuf_AssignDescriptors() {\n" // Make sure the file has found its way into the pool. If a descriptor // is requested *during* static init then AddDescriptors() may not have // been called yet, so we call it manually. Note that it's fine if @@ -812,7 +812,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { printer->Print( "}\n" "\n" - "void protobuf_AssignDescriptorsOnce() {\n" + "static void protobuf_AssignDescriptorsOnce() {\n" " static ::google::protobuf::internal::once_flag once;\n" " ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);\n" "}\n" @@ -850,7 +850,7 @@ void FileGenerator::GenerateReflectionInitializationCode(io::Printer* printer) { // Now generate the AddDescriptors() function. printer->Print( - "void AddDescriptorsImpl() {\n" + "static void AddDescriptorsImpl() {\n" " InitDefaults();\n"); printer->Indent(); |