use boost filesystem specialization instead of the ones from std
This commit is contained in:
		
							parent
							
								
									edef9c11f7
								
							
						
					
					
						commit
						2435fadfbd
					
				
							
								
								
									
										16
									
								
								prepare.cpp
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								prepare.cpp
									
									
									
									
									
								
							| @ -45,13 +45,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||||||
| #include "typedefs.h" | #include "typedefs.h" | ||||||
| 
 | 
 | ||||||
| #include <boost/foreach.hpp> | #include <boost/foreach.hpp> | ||||||
|  | #include <boost/filesystem.hpp> | ||||||
|  | #include <boost/filesystem/fstream.hpp> | ||||||
| 
 | 
 | ||||||
| #include <luabind/luabind.hpp> | #include <luabind/luabind.hpp> | ||||||
| 
 | 
 | ||||||
| #include <fstream> |  | ||||||
| #include <istream> |  | ||||||
| #include <iostream> |  | ||||||
| #include <cstring> |  | ||||||
| #include <string> | #include <string> | ||||||
| #include <vector> | #include <vector> | ||||||
| 
 | 
 | ||||||
| @ -158,7 +156,7 @@ int main (int argc, char *argv[]) { | |||||||
| 
 | 
 | ||||||
|         omp_set_num_threads( std::min( omp_get_num_procs(), requested_num_threads) ); |         omp_set_num_threads( std::min( omp_get_num_procs(), requested_num_threads) ); | ||||||
|         LogPolicy::GetInstance().Unmute(); |         LogPolicy::GetInstance().Unmute(); | ||||||
|         std::ifstream restrictionsInstream( restrictions_path.c_str(), std::ios::binary); |         boost::filesystem::ifstream restrictionsInstream(restrictions_path, std::ios::binary); | ||||||
|         TurnRestriction restriction; |         TurnRestriction restriction; | ||||||
|         UUID uuid_loaded, uuid_orig; |         UUID uuid_loaded, uuid_orig; | ||||||
|         unsigned usableRestrictionsCounter(0); |         unsigned usableRestrictionsCounter(0); | ||||||
| @ -180,8 +178,8 @@ int main (int argc, char *argv[]) { | |||||||
|         ); |         ); | ||||||
|         restrictionsInstream.close(); |         restrictionsInstream.close(); | ||||||
| 
 | 
 | ||||||
|         std::ifstream in; |         boost::filesystem::ifstream in; | ||||||
|         in.open(input_path.c_str(), std::ifstream::in|std::ifstream::binary); |         in.open(input_path, std::ios::in|std::ios::binary); | ||||||
| 
 | 
 | ||||||
|         const std::string nodeOut = input_path.string() + ".nodes"; |         const std::string nodeOut = input_path.string() + ".nodes"; | ||||||
|         const std::string edgeOut = input_path.string() + ".edges"; |         const std::string edgeOut = input_path.string() + ".edges"; | ||||||
| @ -295,7 +293,7 @@ int main (int argc, char *argv[]) { | |||||||
|          */ |          */ | ||||||
| 
 | 
 | ||||||
|         SimpleLogger().Write() << "writing node map ..."; |         SimpleLogger().Write() << "writing node map ..."; | ||||||
|         std::ofstream mapOutFile(nodeOut, std::ios::binary); |         boost::filesystem::ofstream mapOutFile(nodeOut, std::ios::binary); | ||||||
|         const unsigned size_of_mapping = internalToExternalNodeMapping.size(); |         const unsigned size_of_mapping = internalToExternalNodeMapping.size(); | ||||||
|         mapOutFile.write((char *)&size_of_mapping, sizeof(unsigned)); |         mapOutFile.write((char *)&size_of_mapping, sizeof(unsigned)); | ||||||
|         mapOutFile.write( |         mapOutFile.write( | ||||||
| @ -335,7 +333,7 @@ int main (int argc, char *argv[]) { | |||||||
|             contracted_edge_count << |             contracted_edge_count << | ||||||
|             " edges"; |             " edges"; | ||||||
| 
 | 
 | ||||||
|         std::ofstream hsgr_output_stream(graphOut, std::ios::binary); |         boost::filesystem::ofstream hsgr_output_stream(graphOut, std::ios::binary); | ||||||
|         hsgr_output_stream.write((char*)&uuid_orig, sizeof(UUID) ); |         hsgr_output_stream.write((char*)&uuid_orig, sizeof(UUID) ); | ||||||
|         BOOST_FOREACH(const QueryEdge & edge, contractedEdgeList) |         BOOST_FOREACH(const QueryEdge & edge, contractedEdgeList) | ||||||
|         { |         { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user