mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cosmetics
This commit is contained in:
@ -79,12 +79,7 @@ bool Foam::dictionary::substituteKeyword(const word& keyword)
|
|||||||
{
|
{
|
||||||
const dictionary& addDict = ePtr->dict();
|
const dictionary& addDict = ePtr->dict();
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, addDict, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = addDict.begin();
|
|
||||||
iter != addDict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
add(iter());
|
add(iter());
|
||||||
}
|
}
|
||||||
@ -152,15 +147,22 @@ void Foam::dictionary::write(Ostream& os, bool subDict) const
|
|||||||
os << nl << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os << nl << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(IDLList<entry>, *this, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = begin();
|
|
||||||
iter != end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Write entry & follow with carriage return.
|
const entry& e = *iter;
|
||||||
os << *iter;
|
|
||||||
|
// Write entry
|
||||||
|
os << e;
|
||||||
|
|
||||||
|
// Add new line if applicable
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(e.isDict() || (!e.isDict() && parent()==dictionary::null))
|
||||||
|
&& e != *last()
|
||||||
|
)
|
||||||
|
{
|
||||||
|
os << nl;
|
||||||
|
}
|
||||||
|
|
||||||
// Check stream before going to next entry.
|
// Check stream before going to next entry.
|
||||||
if (!os.good())
|
if (!os.good())
|
||||||
|
|||||||
Reference in New Issue
Block a user