Fix compiler error for empty default ctor for std::atomic<int> variables

This commit is contained in:
Daniel Schopf 2021-05-21 09:32:45 +02:00
parent 12a9feca47
commit bbccb31e8b
3 changed files with 5 additions and 5 deletions

View File

@ -496,7 +496,7 @@ void RepeatedEnumFieldGenerator::GenerateConstinitInitializer(
format("$name$_()");
if (descriptor_->is_packed() &&
HasGeneratedMethods(descriptor_->file(), options_)) {
format("\n, _$name$_cached_byte_size_()");
format("\n, _$name$_cached_byte_size_(0)");
}
}

View File

@ -486,7 +486,7 @@ void RepeatedPrimitiveFieldGenerator::GenerateConstinitInitializer(
format("$name$_()");
if (descriptor_->is_packed() && FixedSize(descriptor_->type()) == -1 &&
HasGeneratedMethods(descriptor_->file(), options_)) {
format("\n, _$name$_cached_byte_size_()");
format("\n, _$name$_cached_byte_size_(0)");
}
}

View File

@ -393,9 +393,9 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UninterpretedOptionDefaultTypeI
constexpr SourceCodeInfo_Location::SourceCodeInfo_Location(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: path_()
, _path_cached_byte_size_()
, _path_cached_byte_size_(0)
, span_()
, _span_cached_byte_size_()
, _span_cached_byte_size_(0)
, leading_detached_comments_()
, leading_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, trailing_comments_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
@ -423,7 +423,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SourceCodeInfoDefaultTypeIntern
constexpr GeneratedCodeInfo_Annotation::GeneratedCodeInfo_Annotation(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: path_()
, _path_cached_byte_size_()
, _path_cached_byte_size_(0)
, source_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, begin_(0)
, end_(0){}