Skip to content

Commit 1df40bc

Browse files
committed
What was this comment I made years ago for? Probably saying this condition should never happen. Check it with a debug assert.
1 parent 220e820 commit 1df40bc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using System.Collections.Specialized;
3+
using System.Diagnostics;
34
using System.Linq;
45
using System.Text;
56
using BizHawk.Common.CollectionExtensions;
@@ -202,7 +203,8 @@ public void Add(int frame, string message)
202203

203204
public new void Remove(TasMovieMarker item)
204205
{
205-
if (item == null || item.Frame == 0) // TODO: Don't do this.
206+
Debug.Assert(item != null, "Attempted to remove a marker that doens't exist.");
207+
if (item == null || item.Frame == 0)
206208
{
207209
return;
208210
}
@@ -248,7 +250,8 @@ public void Move(int fromFrame, int toFrame)
248250
}
249251

250252
TasMovieMarker m = Get(fromFrame);
251-
if (m == null) // TODO: Don't do this.
253+
Debug.Assert(m != null, "Attempted to move a marker that doens't exist.");
254+
if (m == null)
252255
{
253256
return;
254257
}

0 commit comments

Comments
 (0)