mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
use static_cast instead of c-style cast for stream pointers
This commit is contained in:
parent
e38b1cdd69
commit
fee2319093
|
@ -107,7 +107,7 @@ void streaming_workbook_reader::open(const std::vector<std::uint8_t> &data)
|
||||||
void streaming_workbook_reader::open(const std::string &filename)
|
void streaming_workbook_reader::open(const std::string &filename)
|
||||||
{
|
{
|
||||||
stream_.reset(new std::ifstream());
|
stream_.reset(new std::ifstream());
|
||||||
xlnt::detail::open_stream((std::ifstream &)stream_, filename);
|
xlnt::detail::open_stream(static_cast<std::ifstream &>(*stream_), filename);
|
||||||
open(*stream_);
|
open(*stream_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void streaming_workbook_reader::open(const std::string &filename)
|
||||||
void streaming_workbook_reader::open(const std::wstring &filename)
|
void streaming_workbook_reader::open(const std::wstring &filename)
|
||||||
{
|
{
|
||||||
stream_.reset(new std::ifstream());
|
stream_.reset(new std::ifstream());
|
||||||
xlnt::detail::open_stream((std::ifstream &)*stream_, filename);
|
xlnt::detail::open_stream(static_cast<std::ifstream &>(*stream_), filename);
|
||||||
open(*stream_);
|
open(*stream_);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,7 +123,7 @@ void streaming_workbook_reader::open(const std::wstring &filename)
|
||||||
void streaming_workbook_reader::open(const xlnt::path &filename)
|
void streaming_workbook_reader::open(const xlnt::path &filename)
|
||||||
{
|
{
|
||||||
stream_.reset(new std::ifstream());
|
stream_.reset(new std::ifstream());
|
||||||
xlnt::detail::open_stream((std::ifstream &)*stream_, filename.string());
|
xlnt::detail::open_stream(static_cast<std::ifstream &>(*stream_), filename.string());
|
||||||
open(*stream_);
|
open(*stream_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user