void Bitbases::init() {
-#ifndef LARGEBOARDS
+#ifdef LARGEBOARDS
+ // Bitbases are not working for large-board version
+ return;
+#endif
+
std::vector<KPKPosition> db(MAX_INDEX);
unsigned idx, repeat = 1;
for (idx = 0; idx < MAX_INDEX; ++idx)
if (db[idx] == WIN)
KPKBitbase[idx / 32] |= 1 << (idx & 0x1F);
-#endif
}
size_t idx;
std::istringstream ss(fenStr);
- std::memset(this, 0, sizeof(Position));
- std::memset(si, 0, sizeof(StateInfo));
+ std::memset(static_cast<void*>(this), 0, sizeof(Position));
+ std::memset(static_cast<void*>(si), 0, sizeof(StateInfo));
std::fill_n(&pieceList[0][0], sizeof(pieceList) / sizeof(Square), SQ_NONE);
var = v;
st = si;
// Copy some fields of the old state to our new StateInfo object except the
// ones which are going to be recalculated from scratch anyway and then switch
// our state pointer to point to the new (ready to be updated) state.
- std::memcpy(&newSt, st, offsetof(StateInfo, key));
+ std::memcpy(static_cast<void*>(&newSt), static_cast<void*>(st), offsetof(StateInfo, key));
newSt.previous = st;
st = &newSt;