mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Make operator<< to return void
This should help preventing misuse. No functional change.
This commit is contained in:
@@ -139,13 +139,12 @@ Option::operator std::string() const {
|
|||||||
|
|
||||||
/// operator<<() inits options and assigns idx in the correct printing order
|
/// operator<<() inits options and assigns idx in the correct printing order
|
||||||
|
|
||||||
Option& Option::operator<<(const Option& o) {
|
void Option::operator<<(const Option& o) {
|
||||||
|
|
||||||
static size_t index = 0;
|
static size_t index = 0;
|
||||||
|
|
||||||
*this = o;
|
*this = o;
|
||||||
idx = index++;
|
idx = index++;
|
||||||
return *this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
Option(int v, int min, int max, OnChange = NULL);
|
Option(int v, int min, int max, OnChange = NULL);
|
||||||
|
|
||||||
Option& operator=(const std::string& v);
|
Option& operator=(const std::string& v);
|
||||||
Option& operator<<(const Option& o);
|
void operator<<(const Option& o);
|
||||||
operator int() const;
|
operator int() const;
|
||||||
operator std::string() const;
|
operator std::string() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user