Skip to content

Commit

Permalink
simplify EntityNode.ToString()
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Dec 3, 2024
1 parent 88e6007 commit 83bb172
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
9 changes: 2 additions & 7 deletions src/ECS/Entity/EntityNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,9 @@ private readonly string GetString()
{
var sb = new StringBuilder();
if (archetype != null) {
sb.Append("flags: ");
var startPos = sb.Length;
if (startPos < sb.Length) {
sb.Append(" | ");
}
sb.Append("Created");
return "Created";
}
return sb.ToString();
return "";
}
#endregion
}
Expand Down
8 changes: 4 additions & 4 deletions src/Tests/ECS/Entity/Test_Entity_Tree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ public static void Test_Entity_Tree_SetRoot()
AreEqual(2, store.Count);
var node0 = store.GetEntityNode(0);
var node2 = store.GetEntityNode(2);
AreEqual("", node0.ToString());
AreEqual("flags: Created", node2.ToString());
AreEqual("", node0.ToString());
AreEqual("Created", node2.ToString());

AreEqual(NullNode, node0.Flags);
AreEqual(Created, node2.Flags);
AreEqual(NullNode, node0.Flags);
AreEqual(Created, node2.Flags);
}

[Test]
Expand Down

0 comments on commit 83bb172

Please sign in to comment.