Changes ISpriteSource.Frames to be of type IReadOnlyList<ISpriteFrame>.
- Updated implementations to return a ReadOnlyList around an array (to reduce wasted memory from exposing lists or lazy enumerators around lists). - Protect non-public ISpriteFrame classes by making them inner classes to prevent casting. - Added an AsReadOnly extension method for lists.
This commit is contained in:
@@ -233,7 +233,7 @@ namespace OpenRA.Utility
|
||||
{
|
||||
var srcImage = ShpReader.Load(args[1]);
|
||||
|
||||
var srcFrames = srcImage.Frames.ToArray();
|
||||
var srcFrames = srcImage.Frames;
|
||||
var destFrames = srcImage.Frames.ToArray();
|
||||
|
||||
for (var z = 3; z < args.Length - 2; z += 3)
|
||||
|
||||
Reference in New Issue
Block a user