Skip to content

Commit

Permalink
Enable CA1859
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants committed Dec 4, 2023
1 parent 290906a commit 9ac4cd9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,6 @@
*.pnm filter=lfs diff=lfs merge=lfs -text
*.wbmp filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.cur filter=lfs diff=lfs merge=lfs -text
*.ani filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion shared-infrastructure
3 changes: 0 additions & 3 deletions src/ImageSharp.ruleset
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="ImageSharp" ToolsVersion="17.0">
<Include Path="..\shared-infrastructure\sixlabors.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace="Microsoft.CodeAnalysis.CSharp.NetAnalyzers">
<Rule Id="CA1859" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1011" Action="None" />
</Rules>
Expand Down
4 changes: 2 additions & 2 deletions src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void Init(int maxSubFactorH, int maxSubFactorV)

for (int i = 0; i < this.ComponentCount; i++)
{
IJpegComponent component = this.Components[i];
JpegComponent component = this.Components[i];
component.Init(maxSubFactorH, maxSubFactorV);
}
}
Expand All @@ -143,7 +143,7 @@ public void AllocateComponents()
bool fullScan = this.Progressive || !this.Interleaved;
for (int i = 0; i < this.ComponentCount; i++)
{
IJpegComponent component = this.Components[i];
JpegComponent component = this.Components[i];
component.AllocateSpectral(fullScan);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Tiff/Ifd/DirectoryReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static ByteOrder ReadByteOrder(Stream stream)
throw TiffThrowHelper.ThrowInvalidHeader();
}

private IList<ExifProfile> ReadIfds(bool isBigTiff)
private List<ExifProfile> ReadIfds(bool isBigTiff)
{
List<EntryReader> readers = new();
while (this.nextIfdOffset != 0 && this.nextIfdOffset < (ulong)this.stream.Length)
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private void ReadValue64(List<IExifValue> values, Span<byte> offsetBuffer)
}
}

private void Add(IList<IExifValue> values, IExifValue exif, object? value)
private void Add(IList<IExifValue> values, ExifValue exif, object? value)
{
if (!exif.TrySetValue(value))
{
Expand Down

0 comments on commit 9ac4cd9

Please sign in to comment.