We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4bedbb commit 3fd86a6Copy full SHA for 3fd86a6
src/core/cpu_core.h
@@ -58,12 +58,13 @@ struct PGXP_value
58
u32 value;
59
u32 flags;
60
61
- ALWAYS_INLINE void SetValidComp(u32 comp, bool valid)
+ ALWAYS_INLINE void SetValid(u32 comp, bool valid = true)
62
{
63
- flags = (flags & ~(1u << comp)) | (static_cast<u32>(valid) << comp);
+ const u32 mask = (1u << comp);
64
+ flags = valid ? (flags | mask) : (flags & ~mask);
65
}
66
- ALWAYS_INLINE bool GetValidComp(u32 comp) const { return ConvertToBoolUnchecked((flags >> comp) & 1); }
67
+ ALWAYS_INLINE bool HasValid(u32 comp) const { return ConvertToBoolUnchecked((flags >> comp) & 1); }
68
};
69
70
struct State
0 commit comments