mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Make operator<< to return void
This should help preventing misuse. No functional change.
This commit is contained in:
parent
0ba814b3ca
commit
c15b132f03
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue