diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-06-14 02:14:48 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-06-14 02:14:48 +0200 |
| commit | 570f6f9b7c9ed25adf618b02f5cfe0f1b3e9afe7 (patch) | |
| tree | d5ef230605ab9265653f8f63f29cdbf60cc239b7 /src/Interface.cs | |
| parent | 3ef8807774c91df0cd0bb5a82f9137882b77c611 (diff) | |
replace foreach loops with for ones
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index 8439c31e..f451dc56 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -630,8 +630,8 @@ namespace Crow /// <summary>Search a Graphic object in the tree named 'nameToFind'</summary> public GraphicObject FindByName (string nameToFind) { - foreach (GraphicObject w in GraphicTree) { - GraphicObject r = w.FindByName (nameToFind); + for (int i = 0; i < GraphicTree.Count; i++) { + GraphicObject r = GraphicTree[i].FindByName (nameToFind); if (r != null) return r; } @@ -647,8 +647,8 @@ namespace Crow int bmpSize = Math.Abs (stride) * ClientRectangle.Height; bmp = new byte[bmpSize]; - foreach (GraphicObject g in GraphicTree) - g.RegisterForLayouting (LayoutingType.All); + for (int i = 0; i < GraphicTree.Count; i++) + GraphicTree[i].RegisterForLayouting (LayoutingType.All); clipping.AddRectangle (clientRectangle); } |