[DatFile, DatItem] Fix desc-to-name replacements

Previously, sets that had multiple items would trigger issues because of shared information in the items, mostly the Machine parts. By making all of it a clone, it takes a little more memory but ends up resolving all issues in desc-to-name mapping and replacement.
This commit is contained in:
Matt Nadareski
2017-05-14 23:53:03 -07:00
parent bad61d1ed1
commit c65dd866d6
8 changed files with 70 additions and 49 deletions

View File

@@ -3,7 +3,7 @@ using SabreTools.Library.Data;
namespace SabreTools.Library.Dats
{
public class BiosSet : DatItem, ICloneable
public class BiosSet : DatItem
{
#region Private instance variables
@@ -42,7 +42,7 @@ namespace SabreTools.Library.Dats
#region Cloning Methods
public object Clone()
public new object Clone()
{
return new BiosSet()
{
@@ -50,7 +50,7 @@ namespace SabreTools.Library.Dats
Type = this.Type,
Dupe = this.Dupe,
Machine = this.Machine,
Machine = (Machine)this.Machine.Clone(),
Supported = this.Supported,
Publisher = this.Publisher,