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.
This commit is contained in:
Julien Brianceau 2016-11-21 09:29:22 +01:00
parent cd315dcbad
commit a5c30ce623

View File

@ -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.