diff --git a/common/values/parsed_map_field_value.cc b/common/values/parsed_map_field_value.cc index 6a0e3cc5d..a9d04f039 100644 --- a/common/values/parsed_map_field_value.cc +++ b/common/values/parsed_map_field_value.cc @@ -165,7 +165,6 @@ ParsedMapFieldValue ParsedMapFieldValue::Clone(Allocator<> allocator) const { auto cloned_field = cloned->GetReflection()->GetMutableRepeatedFieldRef( cel::to_address(cloned), field_); - cloned_field.Reserve(field.size()); cloned_field.CopyFrom(field); return ParsedMapFieldValue(std::move(cloned), field_); } diff --git a/common/values/parsed_repeated_field_value.cc b/common/values/parsed_repeated_field_value.cc index e66eba49c..a288bba88 100644 --- a/common/values/parsed_repeated_field_value.cc +++ b/common/values/parsed_repeated_field_value.cc @@ -160,7 +160,6 @@ ParsedRepeatedFieldValue ParsedRepeatedFieldValue::Clone( auto cloned_field = cloned->GetReflection()->GetMutableRepeatedFieldRef( cel::to_address(cloned), field_); - cloned_field.Reserve(field.size()); cloned_field.CopyFrom(field); return ParsedRepeatedFieldValue(std::move(cloned), field_); } diff --git a/internal/well_known_types.cc b/internal/well_known_types.cc index f18d11b03..5da4bd2b0 100644 --- a/internal/well_known_types.cc +++ b/internal/well_known_types.cc @@ -1538,9 +1538,6 @@ void ListValueReflection::ReserveValues(absl::NonnullGetDescriptor(), descriptor_); - if (capacity > 0) { - MutableValues(message).Reserve(capacity); - } } absl::StatusOr GetListValueReflection(