From cf2c4231c25911a5480f98fabef282dfbf7c5e83 Mon Sep 17 00:00:00 2001 From: sebas77 Date: Tue, 22 Jan 2019 14:43:16 +0000 Subject: [PATCH] use ToString() where necessary --- Svelto.ECS/CheckEntityUtilities.cs | 6 +++--- Svelto.ECS/DataStructures/TypeSafeDictionary.cs | 6 +++--- Svelto.ECS/EnginesRoot.Engines.cs | 2 +- Svelto.ECS/EntityBuilder.CheckFields.cs | 2 +- Svelto.ECS/EntityBuilder.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Svelto.ECS/CheckEntityUtilities.cs b/Svelto.ECS/CheckEntityUtilities.cs index f61b424..70b6442 100644 --- a/Svelto.ECS/CheckEntityUtilities.cs +++ b/Svelto.ECS/CheckEntityUtilities.cs @@ -47,7 +47,7 @@ namespace Svelto.ECS if (entities.Has(entityID.entityID) == false) { Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ") - .FastConcat(entityType) + .FastConcat(entityType.ToString()) .FastConcat(" id: ") .FastConcat(entityID.entityID) .FastConcat(" groupid: ") @@ -57,7 +57,7 @@ namespace Svelto.ECS else { Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ") - .FastConcat(entityType) + .FastConcat(entityType.ToString()) .FastConcat(" id: ") .FastConcat(entityID.entityID) .FastConcat(" groupid: ") @@ -94,7 +94,7 @@ namespace Svelto.ECS if (entities.Has(entityID.entityID) == true) { Console.LogError("Entity ".FastConcat(name, " with used ID is about to be built: ") - .FastConcat(entityType) + .FastConcat(entityType.ToString()) .FastConcat(" id: ") .FastConcat(entityID.entityID) .FastConcat(" groupid: ") diff --git a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs index 734e1a2..5469a96 100644 --- a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs +++ b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs @@ -54,7 +54,7 @@ namespace Svelto.ECS.Internal catch (Exception e) { throw new TypeSafeDictionaryException("trying to add an EntityView with the same ID more than once Entity: ". - FastConcat(typeof(TValue)).FastConcat("id ").FastConcat(idEntityId), e); + FastConcat(typeof(TValue).ToString()).FastConcat("id ").FastConcat(idEntityId), e); } } } @@ -97,7 +97,7 @@ namespace Svelto.ECS.Internal catch (Exception e) { throw new ECSException("Code crashed inside Add callback ". - FastConcat(typeof(TValue)).FastConcat("id ").FastConcat(entity.ID.entityID), e); + FastConcat(typeof(TValue).ToString()).FastConcat("id ").FastConcat(entity.ID.entityID), e); } } } @@ -144,7 +144,7 @@ namespace Svelto.ECS.Internal catch (Exception e) { throw new ECSException("Code crashed inside Remove callback ". - FastConcat(typeof(TValue)).FastConcat("id ").FastConcat(entity.ID.entityID), e); + FastConcat(typeof(TValue).ToString()).FastConcat("id ").FastConcat(entity.ID.entityID), e); } } diff --git a/Svelto.ECS/EnginesRoot.Engines.cs b/Svelto.ECS/EnginesRoot.Engines.cs index e26159f..e8a2bc3 100644 --- a/Svelto.ECS/EnginesRoot.Engines.cs +++ b/Svelto.ECS/EnginesRoot.Engines.cs @@ -69,7 +69,7 @@ namespace Svelto.ECS #if !DEBUG throw new ECSException("Code crashed while adding engine ".FastConcat(engine.GetType()), e); #else - Console.LogException("Code crashed while adding engine ".FastConcat(engine.GetType()), e); + Console.LogException("Code crashed while adding engine ".FastConcat(engine.GetType().ToString()), e); #endif } } diff --git a/Svelto.ECS/EntityBuilder.CheckFields.cs b/Svelto.ECS/EntityBuilder.CheckFields.cs index 0797cea..4f98c45 100644 --- a/Svelto.ECS/EntityBuilder.CheckFields.cs +++ b/Svelto.ECS/EntityBuilder.CheckFields.cs @@ -45,7 +45,7 @@ namespace Svelto.ECS if (needsReflection == false) { if (type.IsClass) - throw new ECSException("EntityStructs must be structs - entity view: ".FastConcat(ENTITY_VIEW_TYPE)); + throw new ECSException("EntityStructs must be structs - entity view: ".FastConcat(ENTITY_VIEW_TYPE.ToString())); var fields = type.GetFields(BindingFlags.Public | BindingFlags.Instance); diff --git a/Svelto.ECS/EntityBuilder.cs b/Svelto.ECS/EntityBuilder.cs index 696b98b..fbbd3bb 100644 --- a/Svelto.ECS/EntityBuilder.cs +++ b/Svelto.ECS/EntityBuilder.cs @@ -29,7 +29,7 @@ namespace Svelto.ECS { DBC.ECS.Check.Require(implementors != null, "Implementors not found while building an EntityView"); DBC.ECS.Check.Require(castedDic.ContainsKey(entityID.entityID) == false, - "building an entity with already used entity id! id".FastConcat(entityID).FastConcat(" ", ENTITY_VIEW_NAME)); + "building an entity with already used entity id! id".FastConcat((long)entityID).FastConcat(" ", ENTITY_VIEW_NAME)); T entityView; EntityView.BuildEntityView(entityID, out entityView);