Remove unnecessary indirection from palette creation.
This commit is contained in:
@@ -76,6 +76,13 @@ namespace OpenRA.FileFormats
|
||||
colors = (uint[])p.colors.Clone();
|
||||
}
|
||||
|
||||
public Palette(uint[] data)
|
||||
{
|
||||
if (data.Length != 256)
|
||||
throw new InvalidDataException("Attempting to create palette with incorrect array size");
|
||||
colors = (uint[])data.Clone();
|
||||
}
|
||||
|
||||
public ColorPalette AsSystemPalette()
|
||||
{
|
||||
ColorPalette pal;
|
||||
|
||||
Reference in New Issue
Block a user