]> git.tdb.fi Git - ext/openal.git/blob - common/alfstream.cpp
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / common / alfstream.cpp
1
2 #include "config.h"
3
4 #include "alfstream.h"
5
6 #include "strutils.h"
7
8 #ifdef _WIN32
9
10 namespace al {
11
12 ifstream::ifstream(const char *filename, std::ios_base::openmode mode)
13   : std::ifstream{utf8_to_wstr(filename).c_str(), mode}
14 { }
15
16 void ifstream::open(const char *filename, std::ios_base::openmode mode)
17 {
18     std::wstring wstr{utf8_to_wstr(filename)};
19     std::ifstream::open(wstr.c_str(), mode);
20 }
21
22 ifstream::~ifstream() = default;
23
24 } // namespace al
25
26 #endif