Reordering resource aquisition
This commit is contained in:
		
							parent
							
								
									4e589c2575
								
							
						
					
					
						commit
						7579c41a35
					
				| @ -111,10 +111,6 @@ private: | |||||||
|             nodes_file, |             nodes_file, | ||||||
|             std::ios::binary |             std::ios::binary | ||||||
|         ); |         ); | ||||||
|         boost::filesystem::ifstream edges_input_stream( |  | ||||||
|             edges_file, |  | ||||||
|             std::ios::binary |  | ||||||
|         ); |  | ||||||
| 
 | 
 | ||||||
|         SimpleLogger().Write(logDEBUG) << "Loading node data"; |         SimpleLogger().Write(logDEBUG) << "Loading node data"; | ||||||
|         NodeInfo current_node; |         NodeInfo current_node; | ||||||
| @ -130,8 +126,11 @@ private: | |||||||
|         std::vector<FixedPointCoordinate>(m_coordinate_list).swap(m_coordinate_list); |         std::vector<FixedPointCoordinate>(m_coordinate_list).swap(m_coordinate_list); | ||||||
|         nodes_input_stream.close(); |         nodes_input_stream.close(); | ||||||
| 
 | 
 | ||||||
|         SimpleLogger().Write(logDEBUG) |         SimpleLogger().Write(logDEBUG) << "Loading edge data"; | ||||||
|             << "Loading edge data"; |         boost::filesystem::ifstream edges_input_stream( | ||||||
|  |             edges_file, | ||||||
|  |             std::ios::binary | ||||||
|  |         ); | ||||||
|         unsigned number_of_edges = 0; |         unsigned number_of_edges = 0; | ||||||
|         edges_input_stream.read((char*)&number_of_edges, sizeof(unsigned)); |         edges_input_stream.read((char*)&number_of_edges, sizeof(unsigned)); | ||||||
|         m_via_node_list.resize(number_of_edges); |         m_via_node_list.resize(number_of_edges); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user