fix 2672
This commit is contained in:
		
							parent
							
								
									8831ca2f32
								
							
						
					
					
						commit
						ee47afbe17
					
				| @ -1,3 +1,8 @@ | |||||||
|  | # 5.3.0 | ||||||
|  |   Changes from 5.3.0-rc.3 | ||||||
|  |     - Bugfixes | ||||||
|  |       - Fix BREAKING: bug that could result in failure to load 'osrm.icd' files. This breaks the dataformat | ||||||
|  | 
 | ||||||
| # 5.3.0 RC3 | # 5.3.0 RC3 | ||||||
|   Changes from 5.3.0-rc.2 |   Changes from 5.3.0-rc.2 | ||||||
|     - Guidance |     - Guidance | ||||||
|  | |||||||
| @ -360,7 +360,7 @@ class InternalDataFacade final : public BaseDataFacade | |||||||
|             std::vector<util::guidance::BearingClass> bearing_classes; |             std::vector<util::guidance::BearingClass> bearing_classes; | ||||||
|             // and the actual bearing values
 |             // and the actual bearing values
 | ||||||
|             std::uint64_t num_bearings; |             std::uint64_t num_bearings; | ||||||
|             intersection_stream >> num_bearings; |             intersection_stream.read(reinterpret_cast<char*>(&num_bearings),sizeof(num_bearings)); | ||||||
|             m_bearing_values_table.resize(num_bearings); |             m_bearing_values_table.resize(num_bearings); | ||||||
|             intersection_stream.read(reinterpret_cast<char *>(&m_bearing_values_table[0]), |             intersection_stream.read(reinterpret_cast<char *>(&m_bearing_values_table[0]), | ||||||
|                                      sizeof(m_bearing_values_table[0]) * num_bearings); |                                      sizeof(m_bearing_values_table[0]) * num_bearings); | ||||||
|  | |||||||
| @ -62,6 +62,13 @@ class EntryClass | |||||||
|     friend std::size_t std::hash<EntryClass>::operator()(const EntryClass &) const; |     friend std::size_t std::hash<EntryClass>::operator()(const EntryClass &) const; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | #if not defined __GNUC__ or __GNUC__ > 4 | ||||||
|  | static_assert(std::is_trivially_copyable<EntryClass>::value, | ||||||
|  |               "Class is serialized trivially in " | ||||||
|  |               "the datafacades. Bytewise writing " | ||||||
|  |               "requires trivially copyable type"); | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| } // namespace guidance
 | } // namespace guidance
 | ||||||
| } // namespace utilr
 | } // namespace utilr
 | ||||||
| } // namespace osrm
 | } // namespace osrm
 | ||||||
|  | |||||||
| @ -507,8 +507,8 @@ Extractor::BuildEdgeExpandedGraph(lua_State *lua_state, | |||||||
| 
 | 
 | ||||||
|     std::vector<std::uint32_t> turn_lane_offsets; |     std::vector<std::uint32_t> turn_lane_offsets; | ||||||
|     std::vector<guidance::TurnLaneType::Mask> turn_lane_masks; |     std::vector<guidance::TurnLaneType::Mask> turn_lane_masks; | ||||||
|     if( !util::deserializeAdjacencyArray( |     if (!util::deserializeAdjacencyArray( | ||||||
|         config.turn_lane_descriptions_file_name, turn_lane_offsets, turn_lane_masks) ) |             config.turn_lane_descriptions_file_name, turn_lane_offsets, turn_lane_masks)) | ||||||
|     { |     { | ||||||
|         util::SimpleLogger().Write(logWARNING) << "Reading Turn Lane Masks failed."; |         util::SimpleLogger().Write(logWARNING) << "Reading Turn Lane Masks failed."; | ||||||
|     } |     } | ||||||
| @ -673,7 +673,7 @@ void Extractor::WriteIntersectionClassificationData( | |||||||
|     util::RangeTable<> bearing_class_range_table(bearing_counts); |     util::RangeTable<> bearing_class_range_table(bearing_counts); | ||||||
|     file_out_stream << bearing_class_range_table; |     file_out_stream << bearing_class_range_table; | ||||||
| 
 | 
 | ||||||
|     file_out_stream << total_bearings; |     file_out_stream.write(reinterpret_cast<const char *>(&total_bearings), sizeof(total_bearings)); | ||||||
|     for (const auto &bearing_class : bearing_classes) |     for (const auto &bearing_class : bearing_classes) | ||||||
|     { |     { | ||||||
|         const auto &bearings = bearing_class.getAvailableBearings(); |         const auto &bearings = bearing_class.getAvailableBearings(); | ||||||
| @ -681,17 +681,18 @@ void Extractor::WriteIntersectionClassificationData( | |||||||
|                               sizeof(bearings[0]) * bearings.size()); |                               sizeof(bearings[0]) * bearings.size()); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // FIXME
 |     if (!static_cast<bool>(file_out_stream)) | ||||||
|     // This should be here, but g++4.8 does not have it...
 |     { | ||||||
|     // static_assert(std::is_trivially_copyable<util::guidance::EntryClass>::value,
 |         throw util::exception("Failed to write to " + output_file_name + "."); | ||||||
|     //              "EntryClass Serialization requires trivial copyable entry classes");
 |     } | ||||||
| 
 | 
 | ||||||
|     util::serializeVector(file_out_stream, entry_classes); |     util::serializeVector(file_out_stream, entry_classes); | ||||||
|     TIMER_STOP(write_edges); |     TIMER_STOP(write_edges); | ||||||
|     util::SimpleLogger().Write() << "ok, after " << TIMER_SEC(write_edges) << "s for " |     util::SimpleLogger().Write() << "ok, after " << TIMER_SEC(write_edges) << "s for " | ||||||
|                                  << node_based_intersection_classes.size() << " Indices into " |                                  << node_based_intersection_classes.size() << " Indices into " | ||||||
|                                  << bearing_classes.size() << " bearing classes and " |                                  << bearing_classes.size() << " bearing classes and " | ||||||
|                                  << entry_classes.size() << " entry classes"; |                                  << entry_classes.size() << " entry classes and " << total_bearings | ||||||
|  |                                  << " bearing values." << std::endl; | ||||||
| } | } | ||||||
| } | } | ||||||
| } | } | ||||||
|  | |||||||
| @ -375,7 +375,7 @@ int Storage::Run() | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     std::uint64_t num_bearings; |     std::uint64_t num_bearings; | ||||||
|     intersection_stream >> num_bearings; |     intersection_stream.read(reinterpret_cast<char*>(&num_bearings),sizeof(num_bearings)); | ||||||
| 
 | 
 | ||||||
|     std::vector<DiscreteBearing> bearing_class_table(num_bearings); |     std::vector<DiscreteBearing> bearing_class_table(num_bearings); | ||||||
|     intersection_stream.read(reinterpret_cast<char *>(&bearing_class_table[0]), |     intersection_stream.read(reinterpret_cast<char *>(&bearing_class_table[0]), | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user