Explorar o código

Merge pull request #2398 from jbrianceau/no-static-init-define-fix

C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
Feng Xiao %!s(int64=9) %!d(string=hai) anos
pai
achega
b7632464b4
Modificáronse 1 ficheiros con 1 adicións e 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.