Skip to content
Snippets Groups Projects
Commit 443a8488 authored by Andrew Heather's avatar Andrew Heather
Browse files

Partial revert of 0dccf9de - keeping {}s for case statements

parent ccf61a7d
No related merge requests found
...@@ -80,11 +80,14 @@ void Foam::outputFilterOutputControl::read(const dictionary& dict) ...@@ -80,11 +80,14 @@ void Foam::outputFilterOutputControl::read(const dictionary& dict)
switch (outputControl_) switch (outputControl_)
{ {
case ocTimeStep: case ocTimeStep:
{
outputInterval_ = dict.lookupOrDefault<label>("outputInterval", 0); outputInterval_ = dict.lookupOrDefault<label>("outputInterval", 0);
break; break;
}
default: default:
{
break; break;
}
} }
} }
...@@ -94,24 +97,28 @@ bool Foam::outputFilterOutputControl::output() const ...@@ -94,24 +97,28 @@ bool Foam::outputFilterOutputControl::output() const
switch (outputControl_) switch (outputControl_)
{ {
case ocTimeStep: case ocTimeStep:
{
return return
( (
(outputInterval_ <= 1) (outputInterval_ <= 1)
|| !(time_.timeIndex() % outputInterval_) || !(time_.timeIndex() % outputInterval_)
); );
break; break;
}
case ocOutputTime: case ocOutputTime:
{
return time_.outputTime(); return time_.outputTime();
break; break;
}
default: default:
{
// this error should not actually be possible // this error should not actually be possible
FatalErrorIn("bool Foam::outputFilterOutputControl::output()") FatalErrorIn("bool Foam::outputFilterOutputControl::output()")
<< "Undefined output control: " << "Undefined output control: "
<< outputControlNames_[outputControl_] << nl << outputControlNames_[outputControl_] << nl
<< abort(FatalError); << abort(FatalError);
break; break;
}
} }
return false; return false;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment