mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
More idiomatic signature for operator=()
Return a reference instead of void so to enable chained assignments like "p = q = Position(...);" Suggested by Rein Halbersma. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
Position(const Position& p) { *this = p; }
|
||||
Position(const Position& p, Thread* t) { *this = p; thisThread = t; }
|
||||
Position(const std::string& f, bool c960, Thread* t) { from_fen(f, c960, t); }
|
||||
void operator=(const Position&);
|
||||
Position& operator=(const Position&);
|
||||
|
||||
// Text input/output
|
||||
void from_fen(const std::string& fen, bool isChess960, Thread* th);
|
||||
|
||||
Reference in New Issue
Block a user