2021-01-26 13:01:35 -06:00
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
#include "alfstream.h"
|
|
|
|
|
|
|
|
|
|
#include "strutils.h"
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
|
|
namespace al {
|
|
|
|
|
|
|
|
|
|
ifstream::ifstream(const char *filename, std::ios_base::openmode mode)
|
2024-03-21 17:33:47 +00:00
|
|
|
: std::ifstream{utf8_to_wstr(filename).c_str(), mode}
|
|
|
|
|
{ }
|
2021-01-26 13:01:35 -06:00
|
|
|
|
2024-03-21 17:33:47 +00:00
|
|
|
void ifstream::open(const char *filename, std::ios_base::openmode mode)
|
|
|
|
|
{
|
|
|
|
|
std::wstring wstr{utf8_to_wstr(filename)};
|
|
|
|
|
std::ifstream::open(wstr.c_str(), mode);
|
2021-01-26 13:01:35 -06:00
|
|
|
}
|
|
|
|
|
|
2024-03-21 17:33:47 +00:00
|
|
|
ifstream::~ifstream() = default;
|
2021-01-26 13:01:35 -06:00
|
|
|
|
|
|
|
|
} // namespace al
|
|
|
|
|
|
|
|
|
|
#endif
|