diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.H b/src/OpenFOAM/primitives/bools/Switch/Switch.H index b37e2bbb403d5e50d381c4a13926fef0e02b8c44..4eaa2dd12b532e9618e6489ff29d2b23d01d92f3 100644 --- a/src/OpenFOAM/primitives/bools/Switch/Switch.H +++ b/src/OpenFOAM/primitives/bools/Switch/Switch.H @@ -176,9 +176,10 @@ public: } //- Assignment from bool - void operator=(const bool b) + const Switch& operator=(const bool b) { switch_ = (b ? Switch::TRUE : Switch::FALSE); + return *this; }