Use var everywhere

This commit is contained in:
ScottNZ
2014-06-15 22:17:34 +12:00
parent dbffce81a6
commit 90894aa03e
99 changed files with 312 additions and 312 deletions

View File

@@ -90,9 +90,9 @@ namespace OpenRA.Widgets
if (textSize.X > Bounds.Width - LeftMargin - RightMargin && HasKeyboardFocus)
start += Bounds.Width - LeftMargin - RightMargin - textSize.X;
int minIndex = -1;
int minValue = int.MaxValue;
for (int i = 0; i <= apparentText.Length; i++)
var minIndex = -1;
var minValue = int.MaxValue;
for (var i = 0; i <= apparentText.Length; i++)
{
var dist = Math.Abs(start + font.Measure(apparentText.Substring(0, i)).X - x);
if (dist > minValue)