Skip to content

Commit

Permalink
[Base] changed SymMapBaseCollectionTraversal.Collect typeName argumen…
Browse files Browse the repository at this point in the history
…t to Symbol
  • Loading branch information
luithefirst committed Jun 24, 2024
1 parent 2142e3f commit 1f80b5c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Aardvark.Base/Symbol/SymMapBaseTraversal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,11 @@ public SymMapBase Traverse(SymMapBase map)

public class SymMapBaseCollectionTraversal
{
[Obsolete("Use Symbol overload")]
public static List<SymMapBase> Collect(SymMapBase root, string typenameToCollect)
=> new SymMapBaseCollectionTraversal(root).Collect((Symbol)typenameToCollect);

public static List<SymMapBase> Collect(SymMapBase root, Symbol typenameToCollect)
=> new SymMapBaseCollectionTraversal(root).Collect(typenameToCollect);

public SymMapBaseCollectionTraversal(SymMapBase root) => m_root = root;
Expand All @@ -230,7 +234,13 @@ public SymMapBaseCollectionTraversal(SymMapBase root, TextWriter debugOutput)

private TextWriter m_out = null;

[Obsolete("Use Symbol overload")]
public List<SymMapBase> Collect(string typenameToCollect)
{
return Collect((Symbol)typenameToCollect);
}

public List<SymMapBase> Collect(Symbol typenameToCollect)
{
if (m_out != null)
{
Expand Down Expand Up @@ -283,7 +293,7 @@ private SymMapBase Visit(SymMapBase m, SymMapBaseTraversal.Visit visit)
}

private SymMapBase m_root;
private string m_name;
private Symbol m_name;
private List<SymMapBase> m_result;
private Dictionary<SymMapBase, int> m_visited;
}
Expand Down

0 comments on commit 1f80b5c

Please sign in to comment.