Remove redundant call to Cast<>() (#1154)
This commit is contained in:
committed by
James Newton-King
parent
cc7f5d80eb
commit
859d12e338
@@ -950,8 +950,8 @@ namespace Newtonsoft.Json.Utilities
|
||||
while ((targetType = targetType.BaseType()) != null)
|
||||
{
|
||||
// filter out protected fields
|
||||
IEnumerable<MemberInfo> childPrivateFields =
|
||||
targetType.GetFields(nonPublicBindingAttr).Where(f => f.IsPrivate).Cast<MemberInfo>();
|
||||
IEnumerable<FieldInfo> childPrivateFields =
|
||||
targetType.GetFields(nonPublicBindingAttr).Where(f => f.IsPrivate);
|
||||
|
||||
initialFields.AddRange(childPrivateFields);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user