mirror of
https://github.com/DCFApixels/DragonECS-Graphs.git
synced 2025-09-17 19:24:36 +08:00
refactoring
This commit is contained in:
parent
c0d5d02a5d
commit
506b7e70f6
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DCFApixels.DragonECS.Relations.Utils
|
||||
namespace DCFApixels.DragonECS.Relations.Utils
|
||||
{
|
||||
internal static class ArrayUtility
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ namespace DCFApixels.DragonECS.Relations.Utils
|
||||
/// <returns> new node index</returns>
|
||||
public int InsertAfter(int nodeIndex, int value)
|
||||
{
|
||||
if(++_count >= _nodes.Length)
|
||||
if (++_count >= _nodes.Length)
|
||||
Array.Resize(ref _nodes, _nodes.Length << 1);
|
||||
int newNodeIndex = _recycledNodesCount > 0 ? _recycledNodes[--_recycledNodesCount] : _count;
|
||||
|
||||
@ -83,7 +83,7 @@ namespace DCFApixels.DragonECS.Relations.Utils
|
||||
}
|
||||
public void Remove(int nodeIndex)
|
||||
{
|
||||
if(nodeIndex <= 0)
|
||||
if (nodeIndex <= 0)
|
||||
throw new ArgumentOutOfRangeException();
|
||||
|
||||
ref var node = ref _nodes[nodeIndex];
|
||||
|
Loading…
Reference in New Issue
Block a user