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

View File

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

View File

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

View File

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

View File

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