Skip to content

Commit

Permalink
Rename psq_score in ReducedStateInfo
Browse files Browse the repository at this point in the history
So to be fully in sync with StateInfo, and move struct
to position.h, just below StateInfo.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
  • Loading branch information
mcostalba committed May 26, 2012
1 parent 6c9c6dd commit 3361ad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/position.cpp
Expand Up @@ -700,14 +700,6 @@ 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 recalculated from scratch anyway, then switch our state pointer
// to point to the new, ready to be updated, state.
struct ReducedStateInfo {
Key pawnKey, materialKey;
Value npMaterial[2];
int castleRights, rule50, pliesFromNull;
Score psq_score;
Square epSquare;
};

memcpy(&newSt, st, sizeof(ReducedStateInfo));

newSt.previous = st;
Expand Down
8 changes: 8 additions & 0 deletions src/position.h
Expand Up @@ -60,6 +60,14 @@ struct StateInfo {
StateInfo* previous;
};

struct ReducedStateInfo {
Key pawnKey, materialKey;
Value npMaterial[2];
int castleRights, rule50, pliesFromNull;
Score psqScore;
Square epSquare;
};


/// The position data structure. A position consists of the following data:
///
Expand Down

0 comments on commit 3361ad4

Please sign in to comment.