From 4abb800c4b4f3a509c07821ade8d34e3699bdf10 Mon Sep 17 00:00:00 2001 From: enricotenuti Date: Fri, 30 Aug 2024 17:47:48 +0200 Subject: format fix --- src/core/moves.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/moves.h') diff --git a/src/core/moves.h b/src/core/moves.h index 9753993..8f9c8f5 100644 --- a/src/core/moves.h +++ b/src/core/moves.h @@ -12,6 +12,7 @@ _static uint32_t allowednextmoveH48(uint8_t *, uint8_t, uint32_t); _static_inline uint8_t inverse_trans(uint8_t); _static_inline uint8_t movebase(uint8_t); _static_inline uint8_t moveaxis(uint8_t); +_static_inline uint32_t disable_moves(uint32_t, uint8_t); _static cube_t move(cube_t, uint8_t); _static cube_t premove(cube_t, uint8_t); @@ -43,10 +44,10 @@ allowednextmove(uint8_t *moves, uint8_t n) return axis[1] != axis[2] || base[0] != base[2]; } -static uint32_t +_static_inline uint32_t disable_moves(uint32_t current_result, uint8_t base_index) { - return current_result & ~((1 << base_index) | (1 << (base_index + 1)) | (1 << (base_index + 2))); + return current_result & ~(7 << base_index); } _static uint32_t @@ -144,7 +145,7 @@ move(cube_t c, uint8_t m) _static cube_t premove(cube_t c, uint8_t m) { - switch (m) { + switch (m) { case _move_U: return _premove(U3, c); case _move_U2: -- cgit v1.3