Skip to content

Commit

Permalink
sort
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Jul 5, 2024
1 parent 0ae7435 commit 8013c01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/EcsID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ namespace TinyEcs;

public readonly override bool Equals(object? obj) => obj is EcsID ent && Equals(ent);
public readonly override int GetHashCode() => Value.GetHashCode();
public readonly override string ToString() => Value.ToString();
public readonly override string ToString()
{
if (IsPair)
return $"({First}, {Second}) | {Value}";
return $"[{ID} - @{Generation} | {Value}]";
}
}
3 changes: 2 additions & 1 deletion src/World.Public.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,9 @@ public void PrintGraph()
/// </summary>
/// <param name="terms"></param>
/// <returns></returns>
public Query QueryRaw(params ReadOnlySpan<IQueryTerm> terms)
public Query QueryRaw(params Span<IQueryTerm> terms)
{
terms.Sort();
return GetQuery(
Hashing.Calculate(terms),
terms,
Expand Down

0 comments on commit 8013c01

Please sign in to comment.