mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-10-22 07:02:37 +00:00
Simplify z80 refresh register implementation
This commit is contained in:
1 parent
d533593a14
commit
1fcf394592
1 file changed
+4
-4
+4
-4
@@ -32,16 +32,16 @@ namespace EightBit {
|
||||
public:
|
||||
struct refresh_t {
|
||||
|
||||
bool high : 1;
|
||||
uint8_t variable : 7;
|
||||
bool high : 1;
|
||||
|
||||
constexpr refresh_t(const uint8_t value) noexcept
|
||||
: high(!!(value & Bit7)),
|
||||
variable(value & Mask7)
|
||||
: variable(value & Mask7),
|
||||
high(!!(value & Bit7))
|
||||
{ }
|
||||
|
||||
constexpr operator uint8_t() const noexcept {
|
||||
return (high << 7) | variable;
|
||||
return *(uint8_t*)this;
|
||||
}
|
||||
|
||||
constexpr auto& operator++() noexcept {
|
||||
|
||||
Reference in new issue
Block a user