From 1fcf3945927f1d4ad5bcb90f979bc73fd249274a Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Mon, 23 Mar 2026 16:01:39 +0000 Subject: [PATCH] Simplify z80 refresh register implementation --- Z80/inc/Z80.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Z80/inc/Z80.h b/Z80/inc/Z80.h index 19ab26e..0c559ea 100644 --- a/Z80/inc/Z80.h +++ b/Z80/inc/Z80.h @@ -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 {