Skip to content

Commit c0dcd0b

Browse files
committed
Rename open_filebuf to open_filebuf_from_unicode_path
1 parent 30fe676 commit c0dcd0b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/ghc/filesystem.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ inline int permission_flags(std::ios::openmode mode) {
11951195
}
11961196

11971197
template< class charT, class traits = std::char_traits< charT>>
1198-
__gnu_cxx::stdio_filebuf<charT, traits> open_filebuf(const path& file_path, std::ios::openmode mode) {
1198+
__gnu_cxx::stdio_filebuf<charT, traits> open_filebuf_from_unicode_path(const path& file_path, std::ios::openmode mode) {
11991199
// Opening a file handle/descriptor from the native (wide) string path.
12001200
int file_handle = 0;
12011201
_wsopen_s(&file_handle, GHC_NATIVEWP(file_path), open_flags(mode), _SH_DENYNO, permission_flags(mode));
@@ -1236,7 +1236,7 @@ class basic_filebuf : public std::basic_filebuf<charT, traits>
12361236
if (this->is_open()) {
12371237
return nullptr;
12381238
}
1239-
auto filebuf = detail::open_filebuf<charT, traits>(p, mode);
1239+
auto filebuf = detail::open_filebuf_from_unicode_path<charT, traits>(p, mode);
12401240
if (!filebuf.is_open()) {
12411241
return nullptr;
12421242
}
@@ -1266,7 +1266,7 @@ class basic_ifstream : public std::basic_ifstream<charT, traits>
12661266
}
12671267
void open(const path& p, std::ios_base::openmode mode = std::ios_base::in)
12681268
{
1269-
*this->rdbuf() = detail::open_filebuf<charT, traits>(p, mode | std::ios_base::in);
1269+
*this->rdbuf() = detail::open_filebuf_from_unicode_path<charT, traits>(p, mode | std::ios_base::in);
12701270
if (!this->is_open()) {
12711271
this->setstate(std::ios_base::failbit);
12721272
} else {
@@ -1303,7 +1303,7 @@ class basic_ofstream : public std::basic_ofstream<charT, traits>
13031303
}
13041304
void open(const path& p, std::ios_base::openmode mode = std::ios_base::out)
13051305
{
1306-
*this->rdbuf() = detail::open_filebuf<charT, traits>(p, mode | std::ios_base::out);
1306+
*this->rdbuf() = detail::open_filebuf_from_unicode_path<charT, traits>(p, mode | std::ios_base::out);
13071307
if (!this->is_open()) {
13081308
this->setstate(std::ios_base::failbit);
13091309
} else {
@@ -1340,7 +1340,7 @@ class basic_fstream : public std::basic_fstream<charT, traits>
13401340
}
13411341
void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
13421342
{
1343-
*this->rdbuf() = detail::open_filebuf<charT, traits>(p, mode | std::ios_base::in | std::ios_base::out);
1343+
*this->rdbuf() = detail::open_filebuf_from_unicode_path<charT, traits>(p, mode | std::ios_base::in | std::ios_base::out);
13441344
if (!this->is_open()) {
13451345
this->setstate(std::ios_base::failbit);
13461346
} else {

0 commit comments

Comments
 (0)