66#include < immintrin.h>
77#endif
88
9- namespace chess {
9+ namespace chess {
1010
1111/* *
1212 * toggles the bit
1313 * @param number number to manipulate
1414 * @param index index of bit starting at the LST
1515 * @return the manipulated number
1616 */
17- inline void toggle (BB& number, Square index) { number ^= (1ULL << index); }
17+ inline void toggle (BB& number, Square index) {
18+ number ^= (1ULL << index);
19+ }
1820
1921/* *
2022 * set the bit
2123 * @param number number to manipulate
2224 * @param index index of bit starting at the LST
2325 * @return the manipulated number
2426 */
25- inline void set (BB& number, Square index) { number |= (1ULL << index); }
27+ inline void set (BB& number, Square index) {
28+ number |= (1ULL << index);
29+ }
2630
2731/* *
2832 * unset the bit
2933 * @param number number to manipulate
3034 * @param index index of bit starting at the LST
3135 * @return the manipulated number
3236 */
33- inline void unset (BB& number, Square index) { number &= ~(1ULL << index); }
37+ inline void unset (BB& number, Square index) {
38+ number &= ~(1ULL << index);
39+ }
3440
3541/* *
3642 * get the bit
3743 * @param number number to manipulate
3844 * @param index index of bit starting at the LST
3945 * @return the manipulated number
4046 */
41- inline bool has (BB number, Square index) { return ((number >> index) & 1ULL ) == 1 ; }
47+ inline bool has (BB number, Square index) {
48+ return ((number >> index) & 1ULL ) == 1 ;
49+ }
4250
4351/* *
4452 * returns the index of the LSB
@@ -92,7 +100,9 @@ inline Square nlsb(BB bb, Square n) {
92100 * @param bb
93101 * @return
94102 */
95- inline int popcount (BB bb) { return __builtin_popcountll (bb); }
103+ inline int popcount (BB bb) {
104+ return __builtin_popcountll (bb);
105+ }
96106
97107/* *
98108 * counts the ones inside the bitboard before the given index
@@ -107,7 +117,9 @@ inline int popcount(BB bb, int pos) {
107117 * @param number
108118 * @return
109119 */
110- inline BB lsb_reset (BB number) { return number & (number - 1 ); }
120+ inline BB lsb_reset (BB number) {
121+ return number & (number - 1 );
122+ }
111123
112124/* *
113125 * find fully set groups of 4
@@ -175,5 +187,4 @@ inline T mask() {
175187 return (T) (((T) 1 << N) - 1 );
176188}
177189
178- }
179-
190+ } // namespace chess
0 commit comments