1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

change naming to be less confusing

This commit is contained in:
Shivam 2021-04-04 14:31:08 +02:00
parent 5f1f8ec0ef
commit 4ee8224f8b

View File

@ -27,17 +27,17 @@ namespace osu.Game.Tournament.Models
private const string config_path = "stable.json";
private readonly Storage storage;
private readonly Storage configStorage;
public StableInfo(Storage storage)
{
TournamentStorage tStorage = (TournamentStorage)storage;
this.storage = tStorage.AllTournaments;
configStorage = tStorage.AllTournaments;
if (!this.storage.Exists(config_path))
if (!configStorage.Exists(config_path))
return;
using (Stream stream = this.storage.GetStream(config_path, FileAccess.Read, FileMode.Open))
using (Stream stream = configStorage.GetStream(config_path, FileAccess.Read, FileMode.Open))
using (var sr = new StreamReader(stream))
{
JsonConvert.PopulateObject(sr.ReadToEnd(), this);
@ -46,7 +46,7 @@ namespace osu.Game.Tournament.Models
public void SaveChanges()
{
using (var stream = storage.GetStream(config_path, FileAccess.Write, FileMode.Create))
using (var stream = configStorage.GetStream(config_path, FileAccess.Write, FileMode.Create))
using (var sw = new StreamWriter(stream))
{
sw.Write(JsonConvert.SerializeObject(this,