Replace type check with enum (int) comparison in `Watch`

This commit is contained in:
YoshiRulz 2023-06-13 23:40:18 +10:00
parent ca8a183f38
commit 25ad59d895
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 6 additions and 1 deletions

View File

@ -540,7 +540,12 @@ namespace BizHawk.Client.Common
/// <summary>
/// Gets a value that defined if the current <see cref="Watch"/> is actually a <see cref="SeparatorWatch"/>
/// </summary>
public bool IsSeparator => this is SeparatorWatch;
public bool IsSeparator
#if true // haven't profiled it but this must be faster --yoshi
=> Size is WatchSize.Separator;
#else
=> this is SeparatorWatch;
#endif
/// <summary>
/// Gets or sets notes for current <see cref="Watch"/>