Brace style fixes

This commit is contained in:
ScottNZ
2015-02-12 23:54:32 +13:00
parent 1eb6c984f5
commit 582b6635ff
23 changed files with 21 additions and 82 deletions

View File

@@ -241,9 +241,8 @@ namespace OpenRA.FileFormats
var num = (code >> 4) + 1; // Number of codes (top four bits plus 1)
var len = (byte)(code & 15); // Code length (low four bits)
do
{
length[s++] = len;
} while (--num > 0);
while (--num > 0);
}
n = s;

View File

@@ -187,9 +187,7 @@ namespace OpenRA.FileFormats
blockStart = offset;
}
else
{
offset++;
}
}
// Write what we haven't written up to now

View File

@@ -209,9 +209,7 @@ namespace OpenRA.FileFormats
}
if (audioChannels == 1)
{
audioData = compressed ? AudLoader.LoadSound(audio1.ToArray(), ref adpcmIndex) : audio1.ToArray();
}
else
{
byte[] leftData, rightData;

View File

@@ -617,9 +617,7 @@ namespace OpenRA
}
}
else
{
Thread.Sleep(nextUpdate - now);
}
}
}

View File

@@ -52,10 +52,14 @@ namespace OpenRA.Graphics
for (var k = 0; k < 3; k++)
{
if (trgb[k] < 1 / 6.0f) { rgb[k] = p + ((q - p) * 6 * trgb[k]); }
else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5) { rgb[k] = q; }
else if (trgb[k] >= 0.5f && trgb[k] < 2.0f / 3) { rgb[k] = p + ((q - p) * 6 * (2.0f / 3 - trgb[k])); }
else { rgb[k] = p; }
if (trgb[k] < 1 / 6.0f)
rgb[k] = p + ((q - p) * 6 * trgb[k]);
else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5)
rgb[k] = q;
else if (trgb[k] >= 0.5f && trgb[k] < 2.0f / 3)
rgb[k] = p + ((q - p) * 6 * (2.0f / 3 - trgb[k]));
else
rgb[k] = p;
}
return Color.FromArgb((int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255));

View File

@@ -88,9 +88,7 @@ namespace OpenRA.Traits
start = Stopwatch.GetTimestamp();
}
else
{
start = current;
}
if (prev == act)
break;

View File

@@ -84,9 +84,7 @@ namespace OpenRA.Widgets
if (GetSeries == null || !GetSeries().Any()
|| GetLabelFont == null || GetLabelFont() == null
|| GetAxisFont == null || GetAxisFont() == null)
{
return;
}
var rect = RenderBounds;
var origin = new float2(rect.Left, rect.Bottom);
@@ -133,9 +131,7 @@ namespace OpenRA.Widgets
var value = points.Last();
if (value != 0)
{
tiny.DrawText(GetValueFormat().F(value), origin + new float2(x, -value * scale - 2), color);
}
}
tiny.DrawText(key, new float2(rect.Left, rect.Top) + new float2(5, 10 * keyOffset + 3), color);

View File

@@ -97,9 +97,7 @@ namespace OpenRA
start = Stopwatch.GetTimestamp();
}
else
{
start = current;
}
}
}
}