diff --git a/src/bitboard.cpp b/src/bitboard.cpp
index 3f855c57..39da1976 100644
--- a/src/bitboard.cpp
+++ b/src/bitboard.cpp
@@ -83,7 +83,7 @@ namespace {
/// lsb()/msb() finds the least/most significant bit in a nonzero bitboard.
/// pop_lsb() finds and clears the least significant bit in a nonzero bitboard.
-#if !defined(USE_BSFQ)
+#ifndef USE_BSFQ
Square lsb(Bitboard b) { return BSFTable[bsf_index(b)]; }
@@ -122,7 +122,7 @@ Square msb(Bitboard b) {
return (Square)(result + MS1BTable[b32]);
}
-#endif // !defined(USE_BSFQ)
+#endif // ifndef USE_BSFQ
/// Bitboards::print() prints a bitboard in an easily readable format to the
diff --git a/src/bitboard.h b/src/bitboard.h
index eec8342f..d15d8838 100644
--- a/src/bitboard.h
+++ b/src/bitboard.h
@@ -18,7 +18,7 @@
along with this program. If not, see .
*/
-#if !defined(BITBOARD_H_INCLUDED)
+#ifndef BITBOARD_H_INCLUDED
#define BITBOARD_H_INCLUDED
#include "types.h"
@@ -258,7 +258,7 @@ inline Bitboard attacks_bb(Square s, Bitboard occ) {
/// lsb()/msb() finds the least/most significant bit in a nonzero bitboard.
/// pop_lsb() finds and clears the least significant bit in a nonzero bitboard.
-#if defined(USE_BSFQ)
+#ifdef BSFQ
# if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
@@ -311,7 +311,7 @@ FORCE_INLINE Square pop_lsb(Bitboard* b) {
return s;
}
-#else // if !defined(USE_BSFQ)
+#else // if defined(USE_BSFQ)
extern Square msb(Bitboard b);
extern Square lsb(Bitboard b);
@@ -319,4 +319,4 @@ extern Square pop_lsb(Bitboard* b);
#endif
-#endif // !defined(BITBOARD_H_INCLUDED)
+#endif // #ifndef BITBOARD_H_INCLUDED
diff --git a/src/bitcount.h b/src/bitcount.h
index 2300bc96..ad8df94a 100644
--- a/src/bitcount.h
+++ b/src/bitcount.h
@@ -18,7 +18,7 @@
along with this program. If not, see .
*/
-#if !defined(BITCOUNT_H_INCLUDED)
+#ifndef BITCOUNT_H_INCLUDED
#define BITCOUNT_H_INCLUDED
#include
@@ -81,7 +81,7 @@ inline int popcount(Bitboard b) {
template<>
inline int popcount(Bitboard b) {
-#if !defined(USE_POPCNT)
+#ifndef USE_POPCNT
assert(false);
return b != 0; // Avoid 'b not used' warning
@@ -102,4 +102,4 @@ inline int popcount(Bitboard b) {
#endif
}
-#endif // !defined(BITCOUNT_H_INCLUDED)
+#endif // #ifndef BITCOUNT_H_INCLUDED
diff --git a/src/book.h b/src/book.h
index ed446636..4ce74f47 100644
--- a/src/book.h
+++ b/src/book.h
@@ -17,7 +17,7 @@
along with this program. If not, see .
*/
-#if !defined(BOOK_H_INCLUDED)
+#ifndef BOOK_H_INCLUDED
#define BOOK_H_INCLUDED
#include
@@ -42,4 +42,4 @@ private:
std::string fileName;
};
-#endif // !defined(BOOK_H_INCLUDED)
+#endif // #ifndef BOOK_H_INCLUDED
diff --git a/src/endgame.h b/src/endgame.h
index b560c798..7f3ce6fb 100644
--- a/src/endgame.h
+++ b/src/endgame.h
@@ -17,7 +17,7 @@
along with this program. If not, see .
*/
-#if !defined(ENDGAME_H_INCLUDED)
+#ifndef ENDGAME_H_INCLUDED
#define ENDGAME_H_INCLUDED
#include