diff --git a/samples/cxx/combustor/combustor.cpp b/samples/cxx/combustor/combustor.cpp index 75a5c78a4..ce0ad24d1 100644 --- a/samples/cxx/combustor/combustor.cpp +++ b/samples/cxx/combustor/combustor.cpp @@ -129,7 +129,6 @@ void runexample() } f << std::endl; } - f.close(); } int main() diff --git a/src/base/application.cpp b/src/base/application.cpp index 78526623a..889140376 100644 --- a/src/base/application.cpp +++ b/src/base/application.cpp @@ -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; } } diff --git a/src/clib/ctonedim.cpp b/src/clib/ctonedim.cpp index a50c866e4..167cb276d 100644 --- a/src/clib/ctonedim.cpp +++ b/src/clib/ctonedim.cpp @@ -554,7 +554,6 @@ extern "C" { } else { ofstream fout(fname); SimCabinet::item(i).showSolution(fout); - fout.close(); } return 0; } catch (...) { diff --git a/src/clib/ctrpath.cpp b/src/clib/ctrpath.cpp index dea5aee70..dace69342 100644 --- a/src/clib/ctrpath.cpp +++ b/src/clib/ctrpath.cpp @@ -235,7 +235,6 @@ extern "C" { } else { DiagramCabinet::item(i).writeData(f); } - f.close(); return 0; } catch (...) { return handleAllExceptions(-1, ERR); diff --git a/src/clib/ctxml.cpp b/src/clib/ctxml.cpp index b39c1814d..208011f36 100644 --- a/src/clib/ctxml.cpp +++ b/src/clib/ctxml.cpp @@ -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); diff --git a/src/numerics/BandMatrix.cpp b/src/numerics/BandMatrix.cpp index 0e12055e4..c0ee7527e 100644 --- a/src/numerics/BandMatrix.cpp +++ b/src/numerics/BandMatrix.cpp @@ -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; } diff --git a/test_problems/shared/fileLog.h b/test_problems/shared/fileLog.h index bb9e2882c..2596acebc 100644 --- a/test_problems/shared/fileLog.h +++ b/test_problems/shared/fileLog.h @@ -18,10 +18,6 @@ public: m_fs << std::endl; } - virtual ~fileLog() { - m_fs.close(); - } - std::string m_fName; std::fstream m_fs; };