mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Remove unnecessary calls to ostream.close()
This commit is contained in:
@@ -129,7 +129,6 @@ void runexample()
|
||||
}
|
||||
f << std::endl;
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
@@ -435,7 +435,6 @@ std::string Application::findInputFile(const std::string& name)
|
||||
inname = dirs[i] + "/" + name;
|
||||
std::ifstream fin(inname);
|
||||
if (fin) {
|
||||
fin.close();
|
||||
return inname;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,7 +554,6 @@ extern "C" {
|
||||
} else {
|
||||
ofstream fout(fname);
|
||||
SimCabinet::item(i).showSolution(fout);
|
||||
fout.close();
|
||||
}
|
||||
return 0;
|
||||
} catch (...) {
|
||||
|
||||
@@ -235,7 +235,6 @@ extern "C" {
|
||||
} else {
|
||||
DiagramCabinet::item(i).writeData(f);
|
||||
}
|
||||
f.close();
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
|
||||
@@ -95,7 +95,6 @@ extern "C" {
|
||||
"file "+string(file)+" not found.");
|
||||
}
|
||||
XmlCabinet::item(i).build(f);
|
||||
f.close();
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
|
||||
@@ -240,7 +240,6 @@ int BandMatrix::factor()
|
||||
m_factored = false;
|
||||
ofstream fout("bandmatrix.csv");
|
||||
fout << *this << endl;
|
||||
fout.close();
|
||||
}
|
||||
return info;
|
||||
}
|
||||
@@ -270,7 +269,6 @@ int BandMatrix::solve(doublereal* b, size_t nrhs, size_t ldb)
|
||||
if (info != 0) {
|
||||
ofstream fout("bandmatrix.csv");
|
||||
fout << *this << endl;
|
||||
fout.close();
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,6 @@ public:
|
||||
m_fs << std::endl;
|
||||
}
|
||||
|
||||
virtual ~fileLog() {
|
||||
m_fs.close();
|
||||
}
|
||||
|
||||
std::string m_fName;
|
||||
std::fstream m_fs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user