From c510b30f55e817eb9f498dd985f0af9e36af6172 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Wed, 21 Dec 2022 10:30:46 +0100 Subject: [PATCH] [Board] Refactor unsigned int -> unsigned --- Board.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Board.hpp b/Board.hpp index 36aadff..94d81d8 100644 --- a/Board.hpp +++ b/Board.hpp @@ -41,23 +41,23 @@ private: BitBoard mPieceBBs[BB_NUM] = {}; PieceColor mTurn = PieceColor::White; - static inline void clearIndex(BitBoard &b, unsigned int i) { + static inline void clearIndex(BitBoard &b, unsigned i) { b &= ~(1ULL << i); } - static inline void setIndex(BitBoard &b, unsigned int i) { + static inline void setIndex(BitBoard &b, unsigned i) { b |= 1ULL << i; } - static inline BitBoard indexToBitBoard(unsigned int i) { + static inline BitBoard indexToBitBoard(unsigned i) { return (1ULL << i); } - static inline PieceColor indexToColor(unsigned int i) { + static inline PieceColor indexToColor(unsigned i) { return static_cast(i % 2); } - static inline PieceType indexToType(unsigned int i) { + static inline PieceType indexToType(unsigned i) { return static_cast(i - (i % 2)); } };