diff --git a/include/engine/datafacade/internal_datafacade.hpp b/include/engine/datafacade/internal_datafacade.hpp index 2418792c7..7ed9637f2 100644 --- a/include/engine/datafacade/internal_datafacade.hpp +++ b/include/engine/datafacade/internal_datafacade.hpp @@ -124,7 +124,7 @@ class InternalDataFacade final : public BaseDataFacade throw util::exception("Could not open " + properties_path.string() + " for reading."); } auto PropertiesSize = storage::io::readPropertiesSize(); - storage::io::readProperties(in_stream, reinterpret_cast(&m_profile_properties), PropertiesSize); + storage::io::readProperties(in_stream, &m_profile_properties, PropertiesSize); } void LoadLaneTupleIdPairs(const boost::filesystem::path &lane_data_path) diff --git a/include/storage/io.hpp b/include/storage/io.hpp index 31a2df461..edaab5b54 100644 --- a/include/storage/io.hpp +++ b/include/storage/io.hpp @@ -19,10 +19,10 @@ inline std::size_t readPropertiesSize() { return 1; } template inline void readProperties(boost::filesystem::ifstream &properties_stream, - PropertiesT properties[], - std::size_t PropertiesSize) + PropertiesT *properties, + std::size_t properties_size) { - properties_stream.read(properties, PropertiesSize); + properties_stream.read(reinterpret_cast(properties), properties_size); } #pragma pack(push, 1) diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 767b5aae4..518bca697 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -771,8 +771,8 @@ Storage::ReturnCode Storage::Run(int max_wait) util::exception("Could not open " + config.properties_path.string() + " for reading!"); } io::readProperties(profile_properties_stream, - reinterpret_cast(profile_properties_ptr), - PropertiesSize); + profile_properties_ptr, + sizeof(extractor::ProfileProperties)); // load intersection classes if (!bearing_class_id_table.empty())