AuroraOpenALSoft/common/alfstream.cpp

27 lines
461 B
C++
Raw Normal View History

2019-09-22 19:23:41 +00:00
#include "config.h"
#include "alfstream.h"
#include "strutils.h"
#ifdef _WIN32
namespace al {
ifstream::ifstream(const char *filename, std::ios_base::openmode mode)
: std::ifstream{utf8_to_wstr(filename).c_str(), mode}
{ }
2019-09-22 19:23:41 +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);
2019-09-22 19:23:41 +00:00
}
ifstream::~ifstream() = default;
2019-09-22 19:23:41 +00:00
} // namespace al
#endif