mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00: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:
+1
-1
@@ -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