WatchList - use the new watch to string method, did not wire up the from string, since the load code while very poorly coded, both works and supports legacy formats including older rerecording emulators

This commit is contained in:
adelikat 2015-01-27 02:55:31 +00:00
parent f547dfbb21
commit 8371c23830
1 changed files with 4 additions and 10 deletions

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
@ -104,7 +105,7 @@ namespace BizHawk.Client.Common
return _watchList.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
@ -393,14 +394,7 @@ namespace BizHawk.Client.Common
foreach (var watch in _watchList)
{
sb
.Append(string.Format(AddressFormatStr, watch.Address ?? 0)).Append('\t')
.Append(watch.SizeAsChar).Append('\t')
.Append(watch.TypeAsChar).Append('\t')
.Append(watch.BigEndian ? '1' : '0').Append('\t')
.Append(watch.DomainName).Append('\t')
.Append(watch.Notes)
.AppendLine();
sb.AppendLine(Watch.ToString(watch, _domain));
}
sw.WriteLine(sb.ToString());