Skip to content

Commit

Permalink
Removes uneeded .close() calls
Browse files Browse the repository at this point in the history
These calls are not needed. ofstream's destructor will close the file.

Resolves #298.
  • Loading branch information
luxe authored and speth committed Nov 23, 2015
1 parent 59f8fbc commit b751087
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/base/plots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ void writePlotFile(const std::string& fname, const std::string& fmt,
}
if (fmt == "TEC") {
outputTEC(f, plotTitle, names, data);
f.close();
} else if (fmt == "XL" || fmt == "CSV") {
outputExcel(f, plotTitle, names, data);
f.close();
} else {
throw CanteraError("writePlotFile",
"unsupported plot type:" + fmt);
Expand Down

0 comments on commit b751087

Please sign in to comment.