language feature: Extension Members: CPU-related, enums

This commit is contained in:
GreemDev
2025-07-02 02:03:59 -05:00
parent 6467720c5c
commit e23213d290
16 changed files with 39 additions and 46 deletions

View File

@@ -22,11 +22,11 @@ namespace ARMeilleure.Decoders
static class ConditionExtensions
{
public static Condition Invert(this Condition cond)
extension(Condition condition)
{
// Bit 0 of all conditions is basically a negation bit, so
// inverting this bit has the effect of inverting the condition.
return (Condition)((int)cond ^ 1);
public Condition Inverse => (Condition)((int)condition ^ 1);
}
}
}