]> git.sesse.net Git - stockfish/commitdiff
Make operator<< to return void
authorMarco Costalba <mcostalba@gmail.com>
Thu, 3 Apr 2014 08:34:25 +0000 (10:34 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 3 Apr 2014 08:34:25 +0000 (10:34 +0200)
This should help preventing misuse.

No functional change.

src/ucioption.cpp
src/ucioption.h

index dbab6fc106c833652069b5185b73339f2862db63..a229027970b73bfdbf2e844331b4ac16843b9596 100644 (file)
@@ -139,13 +139,12 @@ Option::operator std::string() const {
 
 /// 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;
 
   *this = o;
   idx = index++;
-  return *this;
 }
 
 
index 75e4ac1301e6d85e2b7daf8bb451bfeeb670a20e..19ca14fdd5746d74e85cecca358b7f6f47537761 100644 (file)
@@ -47,7 +47,7 @@ public:
   Option(int v, int min, int max, OnChange = NULL);
 
   Option& operator=(const std::string& v);
-  Option& operator<<(const Option& o);
+  void operator<<(const Option& o);
   operator int() const;
   operator std::string() const;