mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-17 17:34:34 +08:00
code cleanup
This commit is contained in:
parent
67477ef90d
commit
8418c81e34
@ -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;
|
||||
|
@ -333,7 +333,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
||||
var x = Group.Splited.GetEnumerator();
|
||||
x.MoveNext();
|
||||
return x.Current.GetHashCode() ^ state;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
// }
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user