Browse Source

use ToString() where necessary

tags/2.7
sebas77 5 years ago
parent
commit
cf2c4231c2
5 changed files with 9 additions and 9 deletions
  1. +3
    -3
      Svelto.ECS/CheckEntityUtilities.cs
  2. +3
    -3
      Svelto.ECS/DataStructures/TypeSafeDictionary.cs
  3. +1
    -1
      Svelto.ECS/EnginesRoot.Engines.cs
  4. +1
    -1
      Svelto.ECS/EntityBuilder.CheckFields.cs
  5. +1
    -1
      Svelto.ECS/EntityBuilder.cs

+ 3
- 3
Svelto.ECS/CheckEntityUtilities.cs View File

@@ -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: ")


+ 3
- 3
Svelto.ECS/DataStructures/TypeSafeDictionary.cs View File

@@ -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);
}
}


+ 1
- 1
Svelto.ECS/EnginesRoot.Engines.cs View File

@@ -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
}
}


+ 1
- 1
Svelto.ECS/EntityBuilder.CheckFields.cs View File

@@ -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);



+ 1
- 1
Svelto.ECS/EntityBuilder.cs View File

@@ -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<T>.BuildEntityView(entityID, out entityView);


Loading…
Cancel
Save