small code optimisations as suggested

This commit is contained in:
Matthias Mailänder
2012-06-20 09:51:00 +02:00
parent 84d623397b
commit f4cb798c8b
3 changed files with 2 additions and 8 deletions

View File

@@ -21,10 +21,7 @@ namespace OpenRA.FileFormats
static int[] GetRemapRamp(int[] Ramp)
{
int[] RemapRamp = new int[Ramp.Length];
for (var i=0; i < Ramp.Length; i++)
RemapRamp[i] = Ramp[i] - Ramp[0];
var RemapRamp = Ramp.Select(r => r - Ramp[0]).ToArray();
return RemapRamp;
}