Skip to content

Commit

Permalink
fix: redundant codes
Browse files Browse the repository at this point in the history
  • Loading branch information
insthync committed Dec 3, 2024
1 parent f0a7e28 commit 0d9e16f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Scripts/Extensions/NetDataReaderExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static Vector4 GetVector4(this NetDataReader reader)
return new Vector4(reader.GetFloat(), reader.GetFloat(), reader.GetFloat(), reader.GetFloat());
}

public static TValue[] GetArray<TValue>(this NetDataReader reader)
public static TValue[] GetArrayExtension<TValue>(this NetDataReader reader)
{
int count = reader.GetInt();
TValue[] result = new TValue[count];
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Extensions/NetDataWriterExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public static void PutVector4(this NetDataWriter writer, Vector4 value)
writer.Put(value.w);
}

public static void PutArray<TValue>(this NetDataWriter writer, TValue[] array)
public static void PutArrayExtension<TValue>(this NetDataWriter writer, TValue[] array)
{
if (array == null)
{
Expand Down
4 changes: 2 additions & 2 deletions Scripts/GameApi/LiteNetLibSyncField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,12 @@ public TType this[int i]

internal override void DeserializeValue(NetDataReader reader)
{
Value = reader.GetArray<TType>();
Value = reader.GetArrayExtension<TType>();
}

internal override void SerializeValue(NetDataWriter writer)
{
writer.PutArray(Value);
writer.PutArrayExtension(Value);
}

public int Length { get { return Value.Length; } }
Expand Down

0 comments on commit 0d9e16f

Please sign in to comment.