code cleanup

This commit is contained in:
DCFApixels 2025-04-19 11:06:17 +08:00
parent 67477ef90d
commit 8418c81e34
8 changed files with 22 additions and 22 deletions

View File

@ -78,7 +78,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
entlong ent = default;
bool isValide = false;
var dragged = DragAndDrop.objectReferences[0];
if(dragged is GameObject go)
if (dragged is GameObject go)
{
if (go.TryGetComponent(out EcsEntityConnect connect))
{
@ -105,7 +105,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
}
}
if(isValide)
if (isValide)
{
long entityLong = *(long*)&ent;
fulleProperty.longValue = entityLong;

View File

@ -333,7 +333,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
var x = Group.Splited.GetEnumerator();
x.MoveNext();
return x.Current.GetHashCode() ^ state;
};
}
}
}
#endregion

View File

@ -5,7 +5,7 @@ namespace DCFApixels.DragonECS.Unity.Internal
{
internal readonly struct ReadOnlyList<T> : IEnumerable<T>, IReadOnlyList<T>
{
private readonly List<T> _list;
private readonly List<T> _list;
public ReadOnlyList(List<T> list)
{
_list = list;

View File

@ -62,7 +62,7 @@ namespace DCFApixels.DragonECS.Unity.Internal
state ^= state >> 17;
state ^= state << 5;
return state;
};
}
}
public static void DebugRect_Editor(params Rect[] rects)
{

View File

@ -249,17 +249,17 @@ namespace DCFApixels.DragonECS.Unity.Internal
self._items[index] = item;
}
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
// public static bool TryDequeue_MultiAccess<T>(this ref StructList<T> self, T item)
// {
// var index = Interlocked.Increment(ref self._count);
//
//#if DEBUG
// if (_count <= 0) { Throw.ArgumentOutOfRange(); }
//#endif
// T result = _items[--_count];
// _items[_count] = default;
// return result;
// }
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
// public static bool TryDequeue_MultiAccess<T>(this ref StructList<T> self, T item)
// {
// var index = Interlocked.Increment(ref self._count);
//
//#if DEBUG
// if (_count <= 0) { Throw.ArgumentOutOfRange(); }
//#endif
// T result = _items[--_count];
// _items[_count] = default;
// return result;
// }
}
}

View File

@ -34,7 +34,7 @@ namespace DCFApixels.DragonECS.Unity.RefRepairer.Editors
public bool TryGetMetaID(TypeData key, out string metaID)
{
bool result = _typeKeyMetaIDPairs.TryGetValue(key, out metaID);
if(result && string.IsNullOrEmpty(metaID))
if (result && string.IsNullOrEmpty(metaID))
{
result = false;
_typeKeyMetaIDPairs.Remove(key);