Use covariant return types.
Use the covariant return type feature of C# 9 to allow method overrides to be more specific about their return type. By exposing this information, e.g. for Widget.Clone(), callers will have more information. This allows various casts to be removed as the information is now available within the type system.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.D2k.Graphics
|
||||
public D2kSpriteSequenceLoader(ModData modData)
|
||||
: base(modData) { }
|
||||
|
||||
public override ISpriteSequence CreateSequence(
|
||||
public override D2kSpriteSequence CreateSequence(
|
||||
ModData modData, string tileset, SpriteCache cache, string image, string sequence, MiniYaml data, MiniYaml defaults)
|
||||
{
|
||||
return new D2kSpriteSequence(cache, this, image, sequence, data, defaults);
|
||||
|
||||
Reference in New Issue
Block a user