From 90f2a9952e00b855b5f1bf44ab8bbc9fd16f84b5 Mon Sep 17 00:00:00 2001 From: sebas77 Date: Wed, 24 Oct 2018 17:46:45 +0100 Subject: [PATCH] disabling code when not needed --- Svelto.Common | 2 +- Svelto.ECS/EnginesRoot.Entities.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Svelto.Common b/Svelto.Common index caa6a44..11ed3db 160000 --- a/Svelto.Common +++ b/Svelto.Common @@ -1 +1 @@ -Subproject commit caa6a443cb284dfe9e1947dd1552c15614518bbc +Subproject commit 11ed3db70d728ac4067df91f11d0ae7934a9005a diff --git a/Svelto.ECS/EnginesRoot.Entities.cs b/Svelto.ECS/EnginesRoot.Entities.cs index 61c54db..801f8ba 100644 --- a/Svelto.ECS/EnginesRoot.Entities.cs +++ b/Svelto.ECS/EnginesRoot.Entities.cs @@ -64,7 +64,7 @@ namespace Svelto.ECS return new EntityStructInitializer(entityID, dic); } - +#if DEBUG && !PROFILER void CheckEntityID(EGID entityID, IEntityDescriptor descriptorEntity) { Dictionary @group; @@ -79,14 +79,16 @@ namespace Svelto.ECS } } - static void CheckEntityID(EGID entityID, Type entityType, Dictionary @group, string name) + static void CheckEntityID(EGID entityID, Type entityType, Dictionary @group, + string name) { ITypeSafeDictionary entities; if (@group.TryGetValue(entityType, out entities)) { if (entities.Has(entityID.entityID) == true) { - Svelto.Utilities.Console.LogError("Entity ".FastConcat(name, " with used ID is about to be built: ") + Svelto.Utilities.Console.LogError("Entity ".FastConcat + (name, " with used ID is about to be built: ") .FastConcat(entityType) .FastConcat(" id: ") .FastConcat(entityID.entityID) @@ -95,6 +97,7 @@ namespace Svelto.ECS } } } +#endif ///-------------------------------------------- void Preallocate(int groupID, int size) where T : IEntityDescriptor, new()