Skip to content

Commit

Permalink
Move Clear() call in saving to before row adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlamin committed Sep 6, 2024
1 parent 9160eb3 commit 0d28226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DBCD/DBCDStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ IEnumerator<DynamicKeyValuePair<int>> IEnumerable<DynamicKeyValuePair<int>>.GetE

public void Save(string filename)
{
storage.Clear();
#if NETSTANDARD2_0
var sortedDictionary = new SortedDictionary<int, DBCDRow>(this);
foreach (var record in sortedDictionary)
Expand All @@ -189,7 +190,6 @@ public void Save(string filename)
storage.Add(id, record.AsType<T>());
#endif
storage.Save(filename);
storage.Clear();
}

public DBCDRow ConstructRow(int index)
Expand Down

0 comments on commit 0d28226

Please sign in to comment.