fix 2672
This commit is contained in:
@@ -360,7 +360,7 @@ class InternalDataFacade final : public BaseDataFacade
|
||||
std::vector<util::guidance::BearingClass> bearing_classes;
|
||||
// and the actual bearing values
|
||||
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);
|
||||
intersection_stream.read(reinterpret_cast<char *>(&m_bearing_values_table[0]),
|
||||
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;
|
||||
};
|
||||
|
||||
#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 utilr
|
||||
} // namespace osrm
|
||||
|
||||
Reference in New Issue
Block a user