1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 15:27:30 +08:00

Apply Bindable.Parse refactorings

This commit is contained in:
Dean Herbert 2023-12-13 14:07:38 +09:00
parent ae8a70ddfc
commit 0be6743e87
No known key found for this signature in database
6 changed files with 9 additions and 6 deletions

View File

@ -121,7 +121,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
break;
default:
slider.Current.Parse(textBox.Current.Value);
slider.Current.Parse(textBox.Current.Value, CultureInfo.CurrentCulture);
break;
}
}

View File

@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Configuration
if (setting != null)
{
bindable.Parse(setting.Value);
bindable.Parse(setting.Value, CultureInfo.InvariantCulture);
}
else
{

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
@ -284,7 +285,7 @@ namespace osu.Game.Rulesets.Mods
if (!(target is IParseable parseable))
throw new InvalidOperationException($"Bindable type {target.GetType().ReadableName()} is not {nameof(IParseable)}.");
parseable.Parse(source);
parseable.Parse(source, CultureInfo.InvariantCulture);
}
}

View File

@ -103,7 +103,7 @@ namespace osu.Game.Screens.Edit.Timing
break;
default:
slider.Current.Parse(t.Text);
slider.Current.Parse(t.Text, CultureInfo.CurrentCulture);
break;
}
}

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Globalization;
using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics;
@ -46,7 +47,7 @@ namespace osu.Game.Skinning
if (!(target is IParseable parseable))
throw new InvalidOperationException($"Bindable type {target.GetType().ReadableName()} is not {nameof(IParseable)}.");
parseable.Parse(source);
parseable.Parse(source, CultureInfo.InvariantCulture);
}
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
using JetBrains.Annotations;
@ -330,7 +331,7 @@ namespace osu.Game.Skinning
var bindable = new Bindable<TValue>();
if (val != null)
bindable.Parse(val);
bindable.Parse(val, CultureInfo.InvariantCulture);
return bindable;
}
}