Skip to content

Commit c4bfa3f

Browse files
committed
[C++][NFC] Simplify on_inc_r_reg().
1 parent f4bc1a3 commit c4bfa3f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

z80.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -2450,10 +2450,8 @@ class internals::executor_base : public B {
24502450
return n; }
24512451

24522452
void on_inc_r_reg() {
2453-
// TODO: Consider splitting R into R[7] and R[6:0].
24542453
fast_u8 r = self().on_get_r();
2455-
r = (r & 0x80) | (inc8(r) & 0x7f);
2456-
self().on_set_r(r); }
2454+
self().on_set_r((r & 0x80) | ((r + 1) & 0x7f)); }
24572455

24582456
fast_u8 on_m1_fetch_cycle() {
24592457
fast_u8 n = self().on_fetch_cycle();

0 commit comments

Comments
 (0)