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
-1
View File
@@ -261,7 +261,6 @@ void build_rtree(const std::string &prefix,
const auto num_nodes = static_cast<unsigned>(fixture->nodes.size());
node_stream.write((char *)&num_nodes, sizeof(unsigned));
node_stream.write((char *)&(fixture->nodes[0]), num_nodes * sizeof(extractor::QueryNode));
node_stream.close();
RTreeT r(fixture->edges, nodes_path, leaves_path, fixture->nodes);
}