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/GraphicObjects/GenericStack.cs | |
| parent | 3ef8807774c91df0cd0bb5a82f9137882b77c611 (diff) | |
replace foreach loops with for ones
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index cecdaffd..a21c903d 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -97,18 +97,18 @@ namespace Crow { int d = 0; if (Orientation == Orientation.Horizontal) { - foreach (GraphicObject c in Children) { - if (!c.Visible) + for (int i = 0; i < Children.Count; i++) { + if (!Children[i].Visible) continue; - c.Slot.X = d; - d += c.Slot.Width + Spacing; + Children[i].Slot.X = d; + d += Children[i].Slot.Width + Spacing; } } else { - foreach (GraphicObject c in Children) { - if (!c.Visible) + for (int i = 0; i < Children.Count; i++) { + if (!Children[i].Visible) continue; - c.Slot.Y = d; - d += c.Slot.Height + Spacing; + Children[i].Slot.Y = d; + d += Children[i].Slot.Height + Spacing; } } IsDirty = true; |