Skip to content

Commit cd19fba

Browse files
committed
Removed unneeded overloads.
1 parent 280aa0e commit cd19fba

3 files changed

Lines changed: 4 additions & 40 deletions

File tree

LibIPS.NET/Creator.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ class Creator
3636

3737
// There are no known cases where LIPS wins over libips.
3838

39-
public void Create(MemoryStream source, MemoryStream target, MemoryStream patch)
40-
{
41-
Create((Stream)source, (Stream)target, (Stream)patch);
42-
}
43-
4439
/// <summary>
4540
/// Creates an IPS patch file from a source file path and a target file path.
4641
/// </summary>
@@ -56,17 +51,6 @@ public void Create(string source, string target, string patch)
5651
}
5752
}
5853
/// <summary>
59-
/// Creates an IPS patch file stream from a source file stream and a target file stream.
60-
/// </summary>
61-
/// <param name="source">The source stream that contains the original data.</param>
62-
/// <param name="target">The target stream that contains the modified data.</param>
63-
/// <param name="patch">The patch file stream to contain the resulting patch data.</param>
64-
/// <returns></returns>
65-
public void Create(FileStream source, FileStream target, FileStream patch)
66-
{
67-
Create((Stream)source, (Stream)target, (Stream)patch);
68-
}
69-
/// <summary>
7054
/// Creates an IPS patch stream from a source stream and a target stream.
7155
/// </summary>
7256
/// <param name="source">The source stream that contains the original data.</param>

LibIPS.NET/Patcher.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,14 @@ class Patcher
1111
public const string PatchText = "PATCH";
1212
public const int EndOfFile = 0x454F46;
1313

14-
public void PatchStudy(MemoryStream patch, Studier.IpsStudy study, MemoryStream source, MemoryStream target)
15-
{
16-
PatchStudy((Stream)patch, study, (Stream)source, (Stream)target);
17-
}
1814
public void PatchStudy(string patch, Studier.IpsStudy study, string source, string target)
1915
{
2016
using (FileStream patchStream = File.OpenRead(patch), sourceStream = File.OpenRead(source), targetStream = File.Open(target, FileMode.Create))
2117
{
2218
PatchStudy(patchStream, study, sourceStream, targetStream);
2319
}
2420
}
25-
public void PatchStudy(FileStream patch, Studier.IpsStudy study, FileStream source, FileStream target)
26-
{
27-
PatchStudy((Stream)patch, study, (Stream)source, (Stream)target);
28-
}
21+
2922
public void PatchStudy(Stream patch, Studier.IpsStudy study, Stream source, Stream target)
3023
{
3124
source.CopyTo(target);
@@ -61,21 +54,15 @@ public void PatchStudy(Stream patch, Studier.IpsStudy study, Stream source, Stre
6154
}
6255
if (study.OutlenMax != 0xFFFFFFFF && source.Length <= study.OutlenMax) throw new Exceptions.IpsNotThisException(); // Truncate data without this being needed is a poor idea.
6356
}
64-
public void Patch(MemoryStream patch, MemoryStream source, MemoryStream target)
65-
{
66-
Patch((Stream)patch, (Stream)source, (Stream)target);
67-
}
57+
6858
public void Patch(string patch, string source, string target)
6959
{
7060
using (FileStream patchStream = File.OpenRead(patch), sourceStream = File.OpenRead(source), targetStream = File.Open(target, FileMode.Create))
7161
{
7262
Patch(patchStream, sourceStream, targetStream);
7363
}
7464
}
75-
public void Patch(FileStream patch, FileStream source, FileStream target)
76-
{
77-
Patch((Stream)patch, (Stream)source, (Stream)target);
78-
}
65+
7966
public void Patch(Stream patch, Stream source, Stream target)
8067
{
8168
Studier studier = new Studier();

LibIPS.NET/Studier.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,14 @@ public struct IpsStudy
3232
public long OutlenMax;
3333
public long OutlenMinMem;
3434
};
35-
public IpsStudy Study(MemoryStream patch)
36-
{
37-
return Study((Stream)patch);
38-
}
35+
3936
public IpsStudy Study(string patch)
4037
{
4138
using(FileStream patchStream = File.OpenRead(patch))
4239
{
4340
return Study(patchStream);
4441
}
4542
}
46-
public IpsStudy Study(FileStream patch)
47-
{
48-
return Study((Stream)patch);
49-
}
5043

5144
public IpsStudy Study(Stream patch)
5245
{

0 commit comments

Comments
 (0)