mirror of
https://github.com/DCFApixels/DragonECS-Graphs.git
synced 2025-09-17 19:24:36 +08:00
defines refactoring
This commit is contained in:
parent
d15fe38b50
commit
e2dcd8a402
@ -1,4 +1,7 @@
|
||||
using DCFApixels.DragonECS.Core;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Core;
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
@ -92,7 +95,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetOrNewInverseRelation(int relEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
var info = _relEntityInfos[relEntityID];
|
||||
@ -134,7 +137,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryGetInverseRelation(int relEntityID, out int inverseRelEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
var info = _relEntityInfos[relEntityID];
|
||||
@ -166,7 +169,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetRelationOpposite(int relEntityID, int nodeEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return new StartEnd(_relEntityInfos[relEntityID]).GetOpposite(nodeEntityID);
|
||||
@ -174,7 +177,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public StartEnd GetRelationStartEnd(int relEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return new StartEnd(_relEntityInfos[relEntityID]);
|
||||
@ -182,7 +185,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsRelationStart(int relEntityID, int nodeEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return _relEntityInfos[relEntityID].start == nodeEntityID;
|
||||
@ -190,7 +193,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsRelationEnd(int relEntityID, int nodeEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return _relEntityInfos[relEntityID].end == nodeEntityID;
|
||||
@ -198,7 +201,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetRelationStart(int relEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return _relEntityInfos[relEntityID].start;
|
||||
@ -206,7 +209,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetRelationEnd(int relEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (relEntityID <= 0 || relEntityID >= _relEntityInfos.Length) { Throw.UndefinedException(); }
|
||||
#endif
|
||||
return _relEntityInfos[relEntityID].end;
|
||||
|
@ -1,4 +1,7 @@
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
using System;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
|
@ -1,4 +1,7 @@
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -61,7 +64,7 @@ namespace DCFApixels.DragonECS.Graphs.Internal
|
||||
private SubGraphMap ExecuteFor_Internal(EcsSpan span, JoinMode mode)
|
||||
{
|
||||
//_executeMarker.Begin();
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if DEBUG || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (span.IsNull) { /*_executeMarker.End();*/ Throw.ArgumentNull(nameof(span)); }
|
||||
if (span.WorldID != _graphWorld.ID) { /*_executeMarker.End();*/ Throw.Quiery_ArgumentDifferentWorldsException(); }
|
||||
#endif
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
namespace DCFApixels.DragonECS.Graphs.Internal
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
namespace DCFApixels.DragonECS.Graphs.Internal
|
||||
{
|
||||
internal static unsafe class IntHash
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DCFApixels.DragonECS.Graphs.Internal
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using TValue = System.Int32;
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -1,4 +1,7 @@
|
||||
using System;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Graphs.Internal;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
Loading…
Reference in New Issue
Block a user