Skip to content

Commit

Permalink
remove unused reader/writer classes
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed Mar 6, 2022
1 parent 0411ca1 commit 4b63f43
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 68 deletions.
2 changes: 1 addition & 1 deletion MonoGame.Framework/Graphics/Effect/Effect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Effect (GraphicsDevice graphicsDevice, byte[] effectCode, int index, int
if (!graphicsDevice.EffectCache.TryGetValue(effectKey, out cloneSource))
{
using (var stream = new MemoryStream(effectCode, index + headerSize, count - headerSize, false))
using (var reader = new BinaryReaderEx(stream))
using (var reader = new BinaryReader(stream))
{
// Create one.
cloneSource = new Effect(graphicsDevice);
Expand Down
29 changes: 0 additions & 29 deletions MonoGame.Framework/Utilities/BinaryReaderEx.cs

This file was deleted.

33 changes: 0 additions & 33 deletions MonoGame.Framework/Utilities/BinaryWriterEx.cs

This file was deleted.

8 changes: 4 additions & 4 deletions Tools/MonoGame.Effect.Compiler/Effect/EffectObject.writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void Write(BinaryWriter writer, Options options)

// Write the rest to a memory stream.
using(MemoryStream memStream = new MemoryStream())
using(BinaryWriterEx memWriter = new BinaryWriterEx(memStream))
using(BinaryWriter memWriter = new BinaryWriter(memStream))
{
// Write all the constant buffers.
memWriter.Write(ConstantBuffers.Count);
Expand Down Expand Up @@ -142,14 +142,14 @@ public void Write(BinaryWriter writer, Options options)
writer.Write(Header.ToCharArray());
}

private static void WriteParameters(BinaryWriterEx writer, d3dx_parameter[] parameters, int count)
private static void WriteParameters(BinaryWriter writer, d3dx_parameter[] parameters, int count)
{
writer.Write(count);
for (var i = 0; i < count; i++)
WriteParameter(writer, parameters[i]);
}

private static void WriteParameter(BinaryWriterEx writer, d3dx_parameter param)
private static void WriteParameter(BinaryWriter writer, d3dx_parameter param)
{
var class_ = ToXNAParameterClass(param.class_);
var type = ToXNAParameterType(param.type);
Expand Down Expand Up @@ -180,7 +180,7 @@ private static void WriteParameter(BinaryWriterEx writer, d3dx_parameter param)
}
}

private static void WriteAnnotations(BinaryWriterEx writer, d3dx_parameter[] annotations)
private static void WriteAnnotations(BinaryWriter writer, d3dx_parameter[] annotations)
{
var count = annotations == null ? 0 : annotations.Length;
writer.Write(count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<Compile Include="..\..\MonoGame.Framework\Design\Vector4TypeConverter.cs" />
<Compile Include="..\..\MonoGame.Framework\Design\VectorConversion.cs" />
<Compile Include="..\..\MonoGame.Framework\Graphics\PackedVector\IPackedVector.cs" />
<Compile Include="..\..\MonoGame.Framework\Utilities\BinaryWriterEx.cs" />
<Compile Include="..\..\MonoGame.Framework\Utilities\Hash.cs" />
<Compile Include="..\..\MonoGame.Framework\Platform\Utilities\CurrentPlatform.cs" />
<Compile Include="..\..\MonoGame.Framework.Content.Pipeline\ExternalTool.cs" />
Expand Down

0 comments on commit 4b63f43

Please sign in to comment.