Skip to content

Commit

Permalink
replaced System.Interactive foreach with language foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
David Morasz committed Nov 1, 2018
1 parent 91f00bd commit 3c02d23
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Notui/NotuiContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ void RecursiveChildrenExec(NotuiElement recel)
{
ProcessElements(recel);
if (recel.Children.Count <= 0) return;
recel.Children.Values.ForEach(RecursiveChildrenExec);
foreach (var child in recel.Children.Values)
{
RecursiveChildrenExec(child);
}
}
foreach (var element in Workset)
{
RecursiveChildrenExec(element);
}
Workset.ForEach(RecursiveChildrenExec);
}

internal MainloopThread(IEnumerable<NotuiElement> workset, NotuiContext ctx, bool async = true)
Expand Down Expand Up @@ -254,7 +260,10 @@ public void Mainloop(float deltatime)
element.Hovering.Clear();

// look at which touches hit which element
Touches.Values.ForEach(ProcessTouches);
foreach (var touch in Touches.Values)
{
ProcessTouches(touch);
}

ParallelElementsMainloop();

Expand Down

0 comments on commit 3c02d23

Please sign in to comment.