Remove unnecessary calls to ostream.close()

This commit is contained in:
Ray Speth
2015-11-23 18:06:54 -05:00
parent b751087859
commit 7562d79bad
7 changed files with 0 additions and 11 deletions

View File

@@ -129,7 +129,6 @@ void runexample()
}
f << std::endl;
}
f.close();
}
int main()

View File

@@ -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;
}
}

View File

@@ -554,7 +554,6 @@ extern "C" {
} else {
ofstream fout(fname);
SimCabinet::item(i).showSolution(fout);
fout.close();
}
return 0;
} catch (...) {

View File

@@ -235,7 +235,6 @@ extern "C" {
} else {
DiagramCabinet::item(i).writeData(f);
}
f.close();
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -18,10 +18,6 @@ public:
m_fs << std::endl;
}
virtual ~fileLog() {
m_fs.close();
}
std::string m_fName;
std::fstream m_fs;
};