Flush stxxl vectors before using in PrepareData
This commit is contained in:
committed by
Patrick Niklaus
parent
045d25041f
commit
b57169e221
@@ -125,6 +125,17 @@ ExtractionContainers::ExtractionContainers()
|
||||
name_offsets.push_back(0);
|
||||
}
|
||||
|
||||
void ExtractionContainers::FlushVectors()
|
||||
{
|
||||
used_node_id_list.flush();
|
||||
all_nodes_list.flush();
|
||||
all_edges_list.flush();
|
||||
name_char_data.flush();
|
||||
name_offsets.flush();
|
||||
restrictions_list.flush();
|
||||
way_start_end_id_list.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the collected data and serializes it.
|
||||
* At this point nodes are still referenced by their OSM id.
|
||||
@@ -145,6 +156,8 @@ void ExtractionContainers::PrepareData(ScriptingEnvironment &scripting_environme
|
||||
const util::FingerPrint fingerprint = util::FingerPrint::GetValid();
|
||||
file_out_stream.write((char *)&fingerprint, sizeof(util::FingerPrint));
|
||||
|
||||
FlushVectors();
|
||||
|
||||
PrepareNodes();
|
||||
WriteNodes(file_out_stream);
|
||||
PrepareEdges(scripting_environment);
|
||||
|
||||
Reference in New Issue
Block a user