Use readonly fields.

This commit is contained in:
Huo Yaoyuan
2017-05-08 18:56:04 +08:00
parent 4f8549f220
commit dff05bec79
7 changed files with 54 additions and 54 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Beatmaps.Formats
{
public abstract class BeatmapDecoder
{
private static Dictionary<string, Type> decoders { get; } = new Dictionary<string, Type>();
private static readonly Dictionary<string, Type> decoders = new Dictionary<string, Type>();
public static BeatmapDecoder GetDecoder(StreamReader stream)
{

View File

@ -13,11 +13,11 @@ namespace osu.Game.Beatmaps.IO
{
private class Reader
{
public Func<Storage, string, bool> Test { get; set; }
public Type Type { get; set; }
public Func<Storage, string, bool> Test;
public Type Type;
}
private static List<Reader> readers { get; } = new List<Reader>();
private static readonly List<Reader> readers = new List<Reader>();
public static ArchiveReader GetReader(Storage storage, string path)
{