Eliminated redundant parameter

This commit is contained in:
jeffman 2015-03-26 16:02:49 -04:00
parent 1d8cdd2e24
commit de4b062c98
2 changed files with 3 additions and 5 deletions

View File

@ -154,7 +154,6 @@ namespace ScriptToolGui
var itemHelpMappingGroups = itemMapping.Select(p => new MatchedGroup( var itemHelpMappingGroups = itemMapping.Select(p => new MatchedGroup(
ebItemHelpRefs.First(e => e.Index == p.First), ebItemHelpRefs.First(e => e.Index == p.First),
m12ItemHelpRefs.First(m => m.Index == p.Second),
m12ItemHelpRefs.First(m => m.Index == p.Second))) m12ItemHelpRefs.First(m => m.Index == p.Second)))
.OrderBy(g => g.Refs[Game.Eb].Index) .OrderBy(g => g.Refs[Game.Eb].Index)
.ToArray(); .ToArray();
@ -168,7 +167,6 @@ namespace ScriptToolGui
var psiHelpMappingGroups = ebPsiHelpRefs.Select(e => var psiHelpMappingGroups = ebPsiHelpRefs.Select(e =>
new MatchedGroup(e, new MatchedGroup(e,
m12PsiHelpRefs.First(m => m.Index == e.Index - 1),
m12PsiHelpRefs.First(m => m.Index == e.Index - 1))) m12PsiHelpRefs.First(m => m.Index == e.Index - 1)))
.ToArray(); .ToArray();
@ -189,7 +187,7 @@ namespace ScriptToolGui
{ {
return ebRefs.Join(m12Refs, e => e.Index, m => m.Index, return ebRefs.Join(m12Refs, e => e.Index, m => m.Index,
(e, m) => new { e, m }) (e, m) => new { e, m })
.Select(p => new MatchedGroup(p.e, p.m, p.m)) .Select(p => new MatchedGroup(p.e, p.m))
.ToArray(); .ToArray();
} }

View File

@ -16,12 +16,12 @@ namespace ScriptToolGui
Refs = new Dictionary<Game, MainStringRef>(); Refs = new Dictionary<Game, MainStringRef>();
} }
public MatchedGroup(MainStringRef ebRef, MainStringRef m12Ref, MainStringRef m12EnglishRef) public MatchedGroup(MainStringRef ebRef, MainStringRef m12Ref)
: this() : this()
{ {
Refs.Add(Game.Eb, ebRef); Refs.Add(Game.Eb, ebRef);
Refs.Add(Game.M12, m12Ref); Refs.Add(Game.M12, m12Ref);
Refs.Add(Game.M12English, m12EnglishRef); Refs.Add(Game.M12English, m12Ref);
} }
public override string ToString() public override string ToString()