From a38975cc7dc89d897caab9bd37d46ed7e9de5747 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 14 Mar 2025 16:53:39 +0800 Subject: [PATCH] defines refactoring --- src/EcsCollectionsExtensions.cs | 6 +++++- src/Exceptions.cs | 5 ++++- src/ThreadRunner.cs | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/EcsCollectionsExtensions.cs b/src/EcsCollectionsExtensions.cs index cae9511..efbce96 100644 --- a/src/EcsCollectionsExtensions.cs +++ b/src/EcsCollectionsExtensions.cs @@ -1,4 +1,8 @@ -namespace DCFApixels.DragonECS +#if DISABLE_DEBUG +#undef DEBUG +#endif + +namespace DCFApixels.DragonECS { public static class EcsCollectionsExtensions { diff --git a/src/Exceptions.cs b/src/Exceptions.cs index 54cca04..501091f 100644 --- a/src/Exceptions.cs +++ b/src/Exceptions.cs @@ -1,4 +1,7 @@ -using System; +#if DISABLE_DEBUG +#undef DEBUG +#endif +using System; namespace DCFApixels.DragonECS { diff --git a/src/ThreadRunner.cs b/src/ThreadRunner.cs index e49fd5f..dac7b3f 100644 --- a/src/ThreadRunner.cs +++ b/src/ThreadRunner.cs @@ -1,3 +1,6 @@ +#if DISABLE_DEBUG +#undef DEBUG +#endif using DCFApixels.DragonECS.ClassicThreadsInternal; using System; using System.Collections.Concurrent; @@ -69,7 +72,7 @@ namespace DCFApixels.DragonECS { if (_isRunning) { -#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS +#if DEBUG || ENABLE_DRAGONECS_ASSERT_CHEKS if (_threads.Any(o => o.thread == Thread.CurrentThread)) { Throw.DoubleParallelIteration();