diff --git a/source/workbook/streaming_workbook_reader.cpp b/source/workbook/streaming_workbook_reader.cpp index 830a0ccd..83aa90a9 100644 --- a/source/workbook/streaming_workbook_reader.cpp +++ b/source/workbook/streaming_workbook_reader.cpp @@ -107,7 +107,7 @@ void streaming_workbook_reader::open(const std::vector &data) void streaming_workbook_reader::open(const std::string &filename) { stream_.reset(new std::ifstream()); - xlnt::detail::open_stream((std::ifstream &)stream_, filename); + xlnt::detail::open_stream(static_cast(*stream_), filename); open(*stream_); } @@ -115,7 +115,7 @@ void streaming_workbook_reader::open(const std::string &filename) void streaming_workbook_reader::open(const std::wstring &filename) { stream_.reset(new std::ifstream()); - xlnt::detail::open_stream((std::ifstream &)*stream_, filename); + xlnt::detail::open_stream(static_cast(*stream_), filename); open(*stream_); } #endif @@ -123,7 +123,7 @@ void streaming_workbook_reader::open(const std::wstring &filename) void streaming_workbook_reader::open(const xlnt::path &filename) { stream_.reset(new std::ifstream()); - xlnt::detail::open_stream((std::ifstream &)*stream_, filename.string()); + xlnt::detail::open_stream(static_cast(*stream_), filename.string()); open(*stream_); }