small code optimisations as suggested
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ); }
|
||||
}
|
||||
|
||||
@@ -91,7 +91,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
|
||||
<Name>OpenRA.Mods.RA</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Render\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user