Skip to content

Commit

Permalink
Remove unnecessary calls to ostream.close()
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Nov 23, 2015
1 parent b751087 commit 7562d79
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion samples/cxx/combustor/combustor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ void runexample()
}
f << std::endl;
}
f.close();
}

int main()
Expand Down
1 change: 0 additions & 1 deletion src/base/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/clib/ctonedim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ extern "C" {
} else {
ofstream fout(fname);
SimCabinet::item(i).showSolution(fout);
fout.close();
}
return 0;
} catch (...) {
Expand Down
1 change: 0 additions & 1 deletion src/clib/ctrpath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ extern "C" {
} else {
DiagramCabinet::item(i).writeData(f);
}
f.close();
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
Expand Down
1 change: 0 additions & 1 deletion src/clib/ctxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions src/numerics/BandMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ int BandMatrix::factor()
m_factored = false;
ofstream fout("bandmatrix.csv");
fout << *this << endl;
fout.close();
}
return info;
}
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions test_problems/shared/fileLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class fileLog: public Cantera::Logger
m_fs << std::endl;
}

virtual ~fileLog() {
m_fs.close();
}

std::string m_fName;
std::fstream m_fs;
};

0 comments on commit 7562d79

Please sign in to comment.