Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Nov 16, 2021
1 parent 73eb0d7 commit 4e63393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Makefile.am
Expand Up @@ -182,10 +182,14 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/Collections/ProtobufEqualityComparers.cs \
csharp/src/Google.Protobuf/Collections/ReadOnlyDictionary.cs \
csharp/src/Google.Protobuf/Collections/RepeatedField.cs \
csharp/src/Google.Protobuf/Compatibility/DynamicallyAccessedMembersAttribute.cs \
csharp/src/Google.Protobuf/Compatibility/DynamicallyAccessedMemberTypes.cs \
csharp/src/Google.Protobuf/Compatibility/MethodInfoExtensions.cs \
csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs \
csharp/src/Google.Protobuf/Compatibility/RequiresUnreferencedCodeAttribute.cs \
csharp/src/Google.Protobuf/Compatibility/StreamExtensions.cs \
csharp/src/Google.Protobuf/Compatibility/TypeExtensions.cs \
csharp/src/Google.Protobuf/Compatibility/UnconditionalSuppressMessageAttribute.cs \
csharp/src/Google.Protobuf/Extension.cs \
csharp/src/Google.Protobuf/ExtensionRegistry.cs \
csharp/src/Google.Protobuf/ExtensionSet.cs \
Expand Down
3 changes: 0 additions & 3 deletions csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs
Expand Up @@ -110,9 +110,6 @@ internal sealed class SingleFieldAccessor : FieldAccessorBase
{
hasDelegate = message => { throw new InvalidOperationException("Presence is not implemented for this field"); };

// While presence isn't supported, clearing still is; it's just setting to a default value.
var clrType = property.PropertyType;

object defaultValue = GetDefaultValue(descriptor);
clearDelegate = message => SetValue(message, defaultValue);
}
Expand Down

0 comments on commit 4e63393

Please sign in to comment.