From 21c164abcfc33a1ff2832e39318d8e1e2ab2d6a8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 15 Jun 2019 15:22:12 -0500 Subject: [PATCH] simplify Last implementation --- .../movie/tasproj/TasStateManager.cs | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs index 717516a1a1..7e401f1d26 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs @@ -437,30 +437,8 @@ namespace BizHawk.Client.Common return _states.Count > 1; } - public int LastKey - { - get - { - if (_states.Count == 0) - { - return 0; - } - - return _states.Last().Key; - } - } - - public int Last - { - get - { - if (Count > 0) - { - return LastKey; - } - - return 0; - } - } + public int Last => _states.Count > 0 + ? _states.Last().Key + : 0; } }