aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2016-11-21 12:05:58 -0800
committerGitHub <noreply@github.com>2016-11-21 12:05:58 -0800
commitb7632464b4efd2f8a8285bd4bfd0fa5157fdeb2d (patch)
tree88051da5c8c4cb269ce5068e263d3b1a57bf34e1
parentcd315dcbadc02569e145bde16e3f66c2fbb08e31 (diff)
parenta5c30ce6239822a02d34f2b2f24eb0ce4157ff3a (diff)
downloadprotobuf-b7632464b4efd2f8a8285bd4bfd0fa5157fdeb2d.tar.gz
protobuf-b7632464b4efd2f8a8285bd4bfd0fa5157fdeb2d.tar.bz2
protobuf-b7632464b4efd2f8a8285bd4bfd0fa5157fdeb2d.zip
Merge pull request #2398 from jbrianceau/no-static-init-define-fix
C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index 369497ce..b8b456b7 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -722,7 +722,7 @@ void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) {
"adddescriptorsname", GlobalAddDescriptorsName(file_->name()));
if (!StaticInitializersForced(file_, options_)) {
- printer->Print("#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER\n");
+ printer->Print("#ifndef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER\n");
}
printer->Print(
// With static initializers.