mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Avoid friend
operator<<(os, pos) does not need to access any private members of pos. No functional change. Resolves #492
This commit is contained in:
parent
e6eeb17aa6
commit
fca8dbc029
2 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ std::ostream& operator<<(std::ostream& os, const Position& pos) {
|
|||
}
|
||||
|
||||
os << "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase
|
||||
<< std::setfill('0') << std::setw(16) << pos.st->key << std::dec << "\nCheckers: ";
|
||||
<< std::setfill('0') << std::setw(16) << pos.key() << std::dec << "\nCheckers: ";
|
||||
|
||||
for (Bitboard b = pos.checkers(); b; )
|
||||
os << UCI::square(pop_lsb(&b)) << " ";
|
||||
|
|
|
@ -82,8 +82,6 @@ struct StateInfo {
|
|||
|
||||
class Position {
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, const Position&);
|
||||
|
||||
public:
|
||||
static void init();
|
||||
|
||||
|
@ -210,6 +208,8 @@ private:
|
|||
bool chess960;
|
||||
};
|
||||
|
||||
extern std::ostream& operator<<(std::ostream& os, const Position& pos);
|
||||
|
||||
inline Color Position::side_to_move() const {
|
||||
return sideToMove;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue