STYLE: fix worst spacing violations for 'os <<' constructions

- accept some violations of the coding guidelines though
- perhaps adding a style exception would be simpler.
This commit is contained in:
Mark Olesen
2010-04-13 17:45:49 +02:00
parent 6b819eb50a
commit 42807ddd7e
37 changed files with 115 additions and 121 deletions

View File

@ -47,8 +47,7 @@ void writeObj(Ostream& os,const pointField& points)
{
const point& pt = points[pointI];
os << "v " << pt.x() << ' ' << pt.y()
<< ' ' << pt.z() << endl;
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}
}

View File

@ -88,7 +88,7 @@ void writeWallFlags(Ostream& os, label cellI, const labelList& wallFlags)
os << "cell " << cellI << " wallsFlags:";
forAll(wallFlags, wallFaceI)
{
os << wallFlags[wallFaceI] << " ";
os << wallFlags[wallFaceI] << ' ';
}
os << endl;
}

View File

@ -508,9 +508,8 @@ void vtkPV3FoamReader::PrintSelf(ostream& os, vtkIndent indent)
foamData_->PrintSelf(os, indent);
os << indent << "Time step range: "
<< this->TimeStepRange[0] << " - " << this->TimeStepRange[1]
<< "\n";
os<< indent << "Time step: " << this->GetTimeStep() << endl;
<< this->TimeStepRange[0] << " - " << this->TimeStepRange[1] << "\n"
<< indent << "Time step: " << this->GetTimeStep() << endl;
}

View File

@ -131,7 +131,6 @@ void printSourceFileAndLine
else
{
string cwdLine(line.replaceAll(cwd() + '/', ""));
string homeLine(cwdLine.replaceAll(home(), '~'));
os << " at " << homeLine.c_str();

View File

@ -53,7 +53,7 @@ void triSurface::writeDXGeometry
os << "# " << patchI << " "
<< myPatches[patchI].name() << endl;
}
os << endl << endl;
os << nl << endl;
// Write vertex coordinates
@ -87,7 +87,6 @@ void triSurface::writeDXGeometry
)
{
const label faceI = faceMap[faceIndex++];
const labelledTri& f = localFaces()[faceI];
os << f[0] << ' ' << f[1] << ' ' << f[2] << endl;

View File

@ -48,7 +48,7 @@ void triSurface::writeOFF(const bool writeSorted, Ostream& os) const
os << "# " << patchI << " "
<< myPatches[patchI].name() << endl;
}
os << endl << endl;
os << nl << endl;
const pointField& ps = points();
@ -56,7 +56,7 @@ void triSurface::writeOFF(const bool writeSorted, Ostream& os) const
<< ps.size()
<< ' ' << size()
<< ' ' << nEdges()
<< endl << endl;
<< nl << endl;
// Write vertex coords
forAll(ps, pointi)

View File

@ -62,8 +62,8 @@ void triSurface::writeSTLASCII(Ostream& os) const
const vector& n = faceNormals()[faceI];
os << " facet normal "
<< n.x() << ' ' << n.y() << ' ' << n.z() << endl;
os << " outer loop" << endl;
<< n.x() << ' ' << n.y() << ' ' << n.z() << nl
<< " outer loop" << endl;
const labelledTri& f = (*this)[faceI];
const point& pa = points()[f[0]];
@ -71,14 +71,12 @@ void triSurface::writeSTLASCII(Ostream& os) const
const point& pc = points()[f[2]];
os << " vertex "
<< pa.x() << ' ' << pa.y() << ' ' << pa.z() << endl;
os << " vertex "
<< pb.x() << ' ' << pb.y() << ' ' << pb.z() << endl;
os << " vertex "
<< pc.x() << ' ' << pc.y() << ' ' << pc.z() << endl;
os
<< " endloop" << endl;
os
<< pa.x() << ' ' << pa.y() << ' ' << pa.z() << nl
<< " vertex "
<< pb.x() << ' ' << pb.y() << ' ' << pb.z() << nl
<< " vertex "
<< pc.x() << ' ' << pc.y() << ' ' << pc.z() << nl
<< " endloop" << nl
<< " endfacet" << endl;
}