Explorar el Código

C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER

Behavior of define GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER has been
altered between 337a028 and cc8ca5b for C++.

See github issue #2385 for further details.
Julien Brianceau hace 8 años
padre
commit
a5c30ce623
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/google/protobuf/compiler/cpp/cpp_file.cc

+ 1 - 1
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.