Use provided parameters to avoid a second lookup.

This commit is contained in:
Dean Herbert 2017-05-02 21:40:06 +09:00
parent 691742b828
commit a036b059e8

View File

@ -24,14 +24,14 @@ namespace osu.Game.Configuration
Set(OsuConfig.Username, string.Empty); Set(OsuConfig.Username, string.Empty);
Set(OsuConfig.Token, string.Empty); Set(OsuConfig.Token, string.Empty);
Set(OsuConfig.SavePassword, false).ValueChanged += delegate Set(OsuConfig.SavePassword, false).ValueChanged += val =>
{ {
if (Get<bool>(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true); if (val) Set(OsuConfig.SaveUsername, true);
}; };
Set(OsuConfig.SaveUsername, true).ValueChanged += delegate Set(OsuConfig.SaveUsername, true).ValueChanged += val =>
{ {
if (!Get<bool>(OsuConfig.SaveUsername)) Set(OsuConfig.SavePassword, false); if (!val) Set(OsuConfig.SavePassword, false);
}; };
// Audio // Audio