simplify Last implementation
This commit is contained in:
parent
6004f30d3a
commit
21c164abcf
|
@ -437,30 +437,8 @@ namespace BizHawk.Client.Common
|
||||||
return _states.Count > 1;
|
return _states.Count > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int LastKey
|
public int Last => _states.Count > 0
|
||||||
{
|
? _states.Last().Key
|
||||||
get
|
: 0;
|
||||||
{
|
|
||||||
if (_states.Count == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _states.Last().Key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Last
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (Count > 0)
|
|
||||||
{
|
|
||||||
return LastKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue