Minor fixes for MSVC

closes https://github.com/official-stockfish/Stockfish/pull/6596

No functional change
This commit is contained in:
mstembera
2026-02-08 15:22:06 +01:00
committed by Disservin
parent bfeb36eb3d
commit 3cde1560f6
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -457,6 +457,8 @@ void move_to_front(std::vector<T>& vec, Predicate pred) {
__builtin_unreachable(); \
} while (0)
#endif
#elif defined(_MSC_VER)
#define sf_assume(cond) __assume(cond)
#else
// do nothing for other compilers
#define sf_assume(cond)
@@ -464,6 +466,8 @@ void move_to_front(std::vector<T>& vec, Predicate pred) {
#ifdef __GNUC__
#define sf_unreachable() __builtin_unreachable()
#elif defined(_MSC_VER)
#define sf_unreachable() __assume(0)
#else
#define sf_unreachable()
#endif