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;
}

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Traits
{
public readonly string BasePalette = null;
public readonly string BaseName = "player";
public readonly int[] RemapIndex = new[] {};
public readonly int[] RemapIndex = {};
public object Create( ActorInitializer init ) { return new PlayerColorPalette( init.self.Owner, this ); }
}

View File

@@ -91,7 +91,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
<Name>OpenRA.Mods.RA</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Render\" />
</ItemGroup>
</Project>