From cbabc42bcfc2dba950f7b505338ed2b67166a11f Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 15 Jun 2017 17:32:04 +0200 Subject: Revert "replace foreach loops with for ones" This reverts commit 1c3263454961eb207a01b67c51d0acf88376d522. --- src/Interface.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Interface.cs') diff --git a/src/Interface.cs b/src/Interface.cs index f451dc56..8439c31e 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -630,8 +630,8 @@ namespace Crow /// Search a Graphic object in the tree named 'nameToFind' public GraphicObject FindByName (string nameToFind) { - for (int i = 0; i < GraphicTree.Count; i++) { - GraphicObject r = GraphicTree[i].FindByName (nameToFind); + foreach (GraphicObject w in GraphicTree) { + GraphicObject r = w.FindByName (nameToFind); if (r != null) return r; } @@ -647,8 +647,8 @@ namespace Crow int bmpSize = Math.Abs (stride) * ClientRectangle.Height; bmp = new byte[bmpSize]; - for (int i = 0; i < GraphicTree.Count; i++) - GraphicTree[i].RegisterForLayouting (LayoutingType.All); + foreach (GraphicObject g in GraphicTree) + g.RegisterForLayouting (LayoutingType.All); clipping.AddRectangle (clientRectangle); } -- cgit v1.3.1-4-g156e