Extract local variables
This commit is contained in:
parent
36144da3ef
commit
129deb2746
|
@ -46,10 +46,10 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public string GenerateLogKey()
|
||||
{
|
||||
var s = string.Join("#", _source.Definition.ControlsOrdered
|
||||
.Select(group => string.Concat(group.Select(button => $"{button}|")))
|
||||
.Where(groupStr => !string.IsNullOrEmpty(groupStr)));
|
||||
return $"LogKey:{(s.Length > 0 ? $"#{s}" : string.Empty)}";
|
||||
var groupStrings = _source.Definition.ControlsOrdered.Select(group =>
|
||||
string.Concat(group.Select(button => $"{button}|")));
|
||||
var s = $"#{string.Join("#", groupStrings.Where(groupStr => !string.IsNullOrEmpty(groupStr)))}";
|
||||
return s.Length > 1 ? $"LogKey:{s}" : "LogKey:";
|
||||
}
|
||||
|
||||
public Dictionary<string, string> Map()
|
||||
|
|
|
@ -152,9 +152,12 @@ namespace BizHawk.Client.Common
|
|||
base.Clear();
|
||||
}
|
||||
|
||||
public override string ToString() => string.Concat(this.Select((k, v) => $"{k} {v}\n"))
|
||||
+ Subtitles
|
||||
+ string.Join("\n", Comments) + "\n";
|
||||
public override string ToString()
|
||||
{
|
||||
var body = string.Concat(this.Select((k, v) => $"{k} {v}\n"));
|
||||
var comments = string.Join("\n", Comments);
|
||||
return string.Concat(body, Subtitles, comments, "\n");
|
||||
}
|
||||
|
||||
public bool ParseLineFromFile(string line)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue