Kaynağa Gözat

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

C++: Fix use with GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
Feng Xiao 8 yıl önce
ebeveyn
işleme
b7632464b4
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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.