From 290de71b7142700388ad9222cdf30bf9e1c2f4ef Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 28 Jun 2019 20:33:40 -0500 Subject: [PATCH] some misc cleanups --- BizHawk.Client.Common/movie/MovieService.cs | 8 +------- .../movie/tasproj/TasMovie.History.cs | 1 - .../movie/tasproj/TasMovieMarker.cs | 14 +++++++++++--- .../movie/tasproj/TasMovieRecord.cs | 1 - 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/BizHawk.Client.Common/movie/MovieService.cs b/BizHawk.Client.Common/movie/MovieService.cs index 0989ba0f9f..77ba5acce8 100644 --- a/BizHawk.Client.Common/movie/MovieService.cs +++ b/BizHawk.Client.Common/movie/MovieService.cs @@ -37,13 +37,7 @@ namespace BizHawk.Client.Common /// /// Gets the file extension for the default movie implementation used in the client /// - public static string DefaultExtension - { - get - { - return "bk2"; - } - } + public static string DefaultExtension => "bk2"; /// /// Gets a list of extensions for all implementations diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index bce2d0a106..54ee1b7e3a 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -8,7 +8,6 @@ namespace BizHawk.Client.Common { public TasMovieChangeLog(TasMovie movie) { - _history = new List>(); _movie = movie; } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs b/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs index f8310b06c5..aae5a848d5 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovieMarker.cs @@ -51,7 +51,7 @@ namespace BizHawk.Client.Common if (obj is TasMovieMarker) { - return Frame == (obj as TasMovieMarker).Frame; + return Frame == ((TasMovieMarker)obj).Frame; } return false; @@ -59,13 +59,21 @@ namespace BizHawk.Client.Common public static bool operator ==(TasMovieMarker marker, int frame) { - // TODO: account for null marker + if (marker == null) + { + return false; + } + return marker.Frame == frame; } public static bool operator !=(TasMovieMarker marker, int frame) { - // TODO: account for null marker + if (marker == null) + { + return false; + } + return marker.Frame != frame; } } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovieRecord.cs b/BizHawk.Client.Common/movie/tasproj/TasMovieRecord.cs index 0351032521..65084ae26e 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovieRecord.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovieRecord.cs @@ -5,7 +5,6 @@ public bool? Lagged { get; set; } public bool? WasLagged { get; set; } public string LogEntry { get; set; } - public bool HasState { get; set; } } }