Skip to content

Commit ac0faa3

Browse files
author
Mark Rydstrom
committed
Remove uncalled code
Closes #6
1 parent 0e4016c commit ac0faa3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

source/Octodiff/Core/ISignatureWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Octodiff.Core
44
{
55
public interface ISignatureWriter
66
{
7-
void WriteMetadata(IHashAlgorithm hashAlgorithm, IRollingChecksum rollingChecksumAlgorithm, byte[] hash);
7+
void WriteMetadata(IHashAlgorithm hashAlgorithm, IRollingChecksum rollingChecksumAlgorithm);
88
void WriteChunk(ChunkSignature signature);
99
}
1010

@@ -17,7 +17,7 @@ public SignatureWriter(Stream signatureStream)
1717
this.signatureStream = new BinaryWriter(signatureStream);
1818
}
1919

20-
public void WriteMetadata(IHashAlgorithm hashAlgorithm, IRollingChecksum rollingChecksumAlgorithm, byte[] hash)
20+
public void WriteMetadata(IHashAlgorithm hashAlgorithm, IRollingChecksum rollingChecksumAlgorithm)
2121
{
2222
signatureStream.Write(BinaryFormat.SignatureHeader);
2323
signatureStream.Write(BinaryFormat.Version);

source/Octodiff/Core/SignatureBuilder.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ void WriteMetadata(Stream stream, ISignatureWriter signatureWriter)
4949
ProgressReporter.ReportProgress("Hashing file", 0, stream.Length);
5050
stream.Seek(0, SeekOrigin.Begin);
5151

52-
var hash = HashAlgorithm.ComputeHash(stream);
53-
54-
signatureWriter.WriteMetadata(HashAlgorithm, RollingChecksumAlgorithm, hash);
52+
signatureWriter.WriteMetadata(HashAlgorithm, RollingChecksumAlgorithm);
5553

5654
ProgressReporter.ReportProgress("Hashing file", stream.Length, stream.Length);
5755
}

0 commit comments

Comments
 (0)