RAII for auto-closing file streams

Small fixes I didn't want to include in unrelated PRs.

There are a few left in `storage.cpp` but since it's a single function
in 600 lines of code, I didn't want to touch the mess. The others are
safe to remove, cucumber and test run on Finland gives 👍.
This commit is contained in:
Daniel J. Hofmann
2016-03-07 15:25:47 +01:00
parent ae4161b780
commit ac0279aa83
13 changed files with 5 additions and 40 deletions
-2
View File
@@ -233,7 +233,6 @@ int main(int argc, char *argv[]) try
{
random_csv << i << ", " << timing_results_raw_random[i] << std::endl;
}
random_csv.close();
osrm::tools::runStatistics(timing_results_raw_random, stats);
osrm::util::SimpleLogger().Write() << "raw random I/O: " << std::setprecision(5)
@@ -305,7 +304,6 @@ int main(int argc, char *argv[]) try
{
seq_csv << i << ", " << timing_results_raw_seq[i] << std::endl;
}
seq_csv.close();
osrm::tools::runStatistics(timing_results_raw_seq, stats);
osrm::util::SimpleLogger().Write() << "raw sequential I/O: " << std::setprecision(5)
<< std::fixed << "min: " << stats.min << "ms, "