ENH: add Switch::negate() method (no-op for invalid state)
- flips state while preserving the textual representation. Eg, OFF <-> ON, YES <-> NO etc. - fix test case to avoid triggering abort(), which we cannot try/catch
Showing
- applications/test/primitives/Test-primitives.C 18 additions, 7 deletionsapplications/test/primitives/Test-primitives.C
- src/OpenFOAM/primitives/bools/Switch/Switch.C 10 additions, 0 deletionssrc/OpenFOAM/primitives/bools/Switch/Switch.C
- src/OpenFOAM/primitives/bools/Switch/Switch.H 5 additions, 1 deletionsrc/OpenFOAM/primitives/bools/Switch/Switch.H
Please register or sign in to comment