diff --git a/snes/smp/core/registers.hpp b/snes/smp/core/registers.hpp index b033c42..3da86c0 100644 --- a/snes/smp/core/registers.hpp +++ b/snes/smp/core/registers.hpp @@ -12,9 +12,9 @@ struct flag_t { return data; } - inline unsigned operator|=(uint8 data) { return operator=(operator unsigned() | data); } - inline unsigned operator^=(uint8 data) { return operator=(operator unsigned() ^ data); } - inline unsigned operator&=(uint8 data) { return operator=(operator unsigned() & data); } + inline unsigned operator|=(uint8 data) { return (*this)=(operator unsigned() | data); } + inline unsigned operator^=(uint8 data) { return (*this)=(operator unsigned() ^ data); } + inline unsigned operator&=(uint8 data) { return (*this)=(operator unsigned() & data); } }; struct word_t {