X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=1273a62fb3d0a0e975e2d06cdbf590359d9c473d;hp=d58fdec1339cfffec3665c3830003824875ac310;hb=4ede49cd850392f28bc9da9537c111d2c3f0b297;hpb=378bcfe7602593b28ceee5feabbe77b20266a195 diff --git a/src/position.cpp b/src/position.cpp index d58fdec1..1273a62f 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -163,7 +163,7 @@ void Position::init() { Position& Position::operator=(const Position& pos) { - memcpy(this, &pos, sizeof(Position)); + std::memcpy(this, &pos, sizeof(Position)); startState = *st; st = &startState; nodes = 0; @@ -722,7 +722,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI // Copy some fields of old state to our new StateInfo object except the ones // which are going to be recalculated from scratch anyway, then switch our state // pointer to point to the new, ready to be updated, state. - memcpy(&newSt, st, StateCopySize64 * sizeof(uint64_t)); + std::memcpy(&newSt, st, StateCopySize64 * sizeof(uint64_t)); newSt.previous = st; st = &newSt; @@ -1089,7 +1089,7 @@ void Position::do_null_move(StateInfo& newSt) { assert(!checkers()); - memcpy(&newSt, st, sizeof(StateInfo)); // Fully copy here + std::memcpy(&newSt, st, sizeof(StateInfo)); // Fully copy here newSt.previous = st; st = &newSt; @@ -1239,7 +1239,7 @@ int Position::see(Move m, int asymmThreshold) const { void Position::clear() { - memset(this, 0, sizeof(Position)); + std::memset(this, 0, sizeof(Position)); startState.epSquare = SQ_NONE; st = &startState;