Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -22,7 +22,7 @@ namespace Server
{
public class Point3DList
{
private static readonly Point3D[] m_EmptyList = new Point3D[0];
private static readonly Point3D[] m_EmptyList = System.Array.Empty<Point3D>();
private Point3D[] m_List;
public Point3DList()
@ -31,7 +31,7 @@ namespace Server
Count = 0;
}
public int Count{ get; private set; }
public int Count { get; private set; }
public Point3D Last => m_List[Count - 1];
@ -46,10 +46,10 @@ namespace Server
{
if (Count + 1 > m_List.Length)
{
Point3D[] old = m_List;
var old = m_List;
m_List = new Point3D[old.Length * 2];
for (int i = 0; i < old.Length; ++i)
for (var i = 0; i < old.Length; ++i)
m_List[i] = old[i];
}
@ -63,10 +63,10 @@ namespace Server
{
if (Count + 1 > m_List.Length)
{
Point3D[] old = m_List;
var old = m_List;
m_List = new Point3D[old.Length * 2];
for (int i = 0; i < old.Length; ++i)
for (var i = 0; i < old.Length; ++i)
m_List[i] = old[i];
}
@ -81,9 +81,9 @@ namespace Server
if (Count == 0)
return m_EmptyList;
Point3D[] list = new Point3D[Count];
var list = new Point3D[Count];
for (int i = 0; i < Count; ++i)
for (var i = 0; i < Count; ++i)
list[i] = m_List[i];
Count = 0;
@ -91,4 +91,4 @@ namespace Server
return list;
}
}
}
}