Commit fbb371dd authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: avoid extraneous c_str() for OFstream construct

parent 0e1c9b0a
......@@ -355,8 +355,8 @@ void Foam::updateMethod::writeCorrection()
correctionFolder_/"cumulativeCorrection" + mesh_.time().timeName()
);
OFstream corFile(correctionFile.c_str());
OFstream cumulCorFile(cumulativeCorrectionFile.c_str());
OFstream corFile(correctionFile);
OFstream cumulCorFile(cumulativeCorrectionFile);
forAll(correction_, cI)
{
corFile
......
......@@ -1831,7 +1831,7 @@ Foam::label Foam::NURBS3DVolume::nWSymmetry() const
}
void Foam::NURBS3DVolume::writeCps(const string fileName) const
void Foam::NURBS3DVolume::writeCps(const fileName& baseName) const
{
const label nCPsU = basisU_.nCPs();
const label nCPsV = basisV_.nCPs();
......@@ -1846,12 +1846,13 @@ void Foam::NURBS3DVolume::writeCps(const string fileName) const
if (Pstream::master())
{
OFstream cpsFile(("optimisation"/cpsFolder_/name_ + fileName + ".csv").c_str());
OFstream cpsFile("optimisation"/cpsFolder_/name_ + baseName + ".csv");
// Write header
cpsFile
<< "\"Points : 0\", \"Points : 1\", \"Points : 2\","
<< "\"u\", \"v\", \"w\","
<< "\"active : 0\", \"active : 1\", \"active : 2\"" << endl;
forAll(cpsInCartesian, cpI)
{
const label iCPw = cpI/label(nCPsU*nCPsV);
......
......@@ -468,7 +468,7 @@ public:
//- Write control points on a cartesian coordinates system for
//- visualization
void writeCps(const string="cpsFile") const;
void writeCps(const fileName& baseName="cpsFile") const;
//- Write control points on the local coordinate system.
// For continuation
......
Markdown is supported
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