mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use Ostream writeEntry when writing key/value entries
- makes for clearer code ENH: make writeIfDifferent part of Ostream
This commit is contained in:
@ -345,18 +345,19 @@ Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const
|
||||
template<class Type>
|
||||
void Foam::Function1Types::TableBase<Type>::writeEntries(Ostream& os) const
|
||||
{
|
||||
if (bounding_ != bounds::repeatableBounding::CLAMP)
|
||||
{
|
||||
os.writeEntry
|
||||
(
|
||||
"outOfBounds",
|
||||
bounds::repeatableBoundingNames[bounding_]
|
||||
);
|
||||
}
|
||||
if (interpolationScheme_ != "linear")
|
||||
{
|
||||
os.writeEntry("interpolationScheme", interpolationScheme_);
|
||||
}
|
||||
os.writeEntryIfDifferent<word>
|
||||
(
|
||||
"outOfBounds",
|
||||
bounds::repeatableBoundingNames[bounds::repeatableBounding::CLAMP],
|
||||
bounds::repeatableBoundingNames[bounding_]
|
||||
);
|
||||
|
||||
os.writeEntryIfDifferent<word>
|
||||
(
|
||||
"interpolationScheme",
|
||||
"linear",
|
||||
interpolationScheme_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user