diff --git a/src/EntityGraph.cs b/src/EntityGraph.cs index d314d22..0a040bb 100644 --- a/src/EntityGraph.cs +++ b/src/EntityGraph.cs @@ -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; diff --git a/src/EntityGraphExtensions.cs b/src/EntityGraphExtensions.cs index c4bad67..29353d0 100644 --- a/src/EntityGraphExtensions.cs +++ b/src/EntityGraphExtensions.cs @@ -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 diff --git a/src/Executors/GraphQueries.cs b/src/Executors/GraphQueries.cs index 2e53bb4..35efba3 100644 --- a/src/Executors/GraphQueries.cs +++ b/src/Executors/GraphQueries.cs @@ -1,4 +1,7 @@ -using DCFApixels.DragonECS.Graphs.Internal; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using DCFApixels.DragonECS.Graphs.Internal; namespace DCFApixels.DragonECS { diff --git a/src/Executors/JoinToSubGraphExecutor.cs b/src/Executors/JoinToSubGraphExecutor.cs index fdedfff..672b741 100644 --- a/src/Executors/JoinToSubGraphExecutor.cs +++ b/src/Executors/JoinToSubGraphExecutor.cs @@ -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 diff --git a/src/Internal/ArrayUtility.cs b/src/Internal/ArrayUtility.cs index 58a7b7a..e25d61e 100644 --- a/src/Internal/ArrayUtility.cs +++ b/src/Internal/ArrayUtility.cs @@ -1,4 +1,7 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Internal/IntHashes.cs b/src/Internal/IntHashes.cs index b946e78..d8fa0f7 100644 --- a/src/Internal/IntHashes.cs +++ b/src/Internal/IntHashes.cs @@ -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 { diff --git a/src/Internal/OnlyAppendHeadLinkedList.cs b/src/Internal/OnlyAppendHeadLinkedList.cs index e75e417..d322eb6 100644 --- a/src/Internal/OnlyAppendHeadLinkedList.cs +++ b/src/Internal/OnlyAppendHeadLinkedList.cs @@ -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 diff --git a/src/Internal/RelationInfo.cs b/src/Internal/RelationInfo.cs index d4b7c11..6b493bb 100644 --- a/src/Internal/RelationInfo.cs +++ b/src/Internal/RelationInfo.cs @@ -1,4 +1,7 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/Internal/SparseMatrix.cs b/src/Internal/SparseMatrix.cs index ca26849..ee58a92 100644 --- a/src/Internal/SparseMatrix.cs +++ b/src/Internal/SparseMatrix.cs @@ -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; diff --git a/src/Internal/UnsafeArray.cs b/src/Internal/UnsafeArray.cs index 207df4f..f5ac9ed 100644 --- a/src/Internal/UnsafeArray.cs +++ b/src/Internal/UnsafeArray.cs @@ -1,4 +1,7 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; diff --git a/src/Utils/Exceptions.cs b/src/Utils/Exceptions.cs index bc3f529..296e829 100644 --- a/src/Utils/Exceptions.cs +++ b/src/Utils/Exceptions.cs @@ -1,4 +1,7 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; diff --git a/src/Utils/RelInfo.cs b/src/Utils/RelInfo.cs index 387f7ec..21e1929 100644 --- a/src/Utils/RelInfo.cs +++ b/src/Utils/RelInfo.cs @@ -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;