From d7b92cbb729840e4f6ce4706f67c737189b2216f Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:05:45 +0200 Subject: [PATCH] Apply some free optimizations to TasMovieMarkerList --- src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs index 1fe16aa3db..a99afdef62 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs @@ -127,7 +127,7 @@ namespace BizHawk.Client.Common public void Add(TasMovieMarker item, bool skipHistory) { - var existingItem = this.FirstOrDefault(m => m.Frame == item.Frame); + var existingItem = Find(m => m.Frame == item.Frame); if (existingItem != null) { if (existingItem.Message != item.Message) @@ -335,7 +335,7 @@ namespace BizHawk.Client.Common public TasMovieMarker Get(int frame) { - return this.FirstOrDefault(m => m == frame); + return Find(m => m == frame); } public void ShiftAt(int frame, int offset)