mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 12:57:52 +00:00
common/file_util: Remove unnecessary c_str() calls
The file stream open functions have supported std::string overloads since C++11, so we don't need to use c_str() here. Same behavior, less code.
This commit is contained in:
parent
8cd3d9be26
commit
e3b2539986
1 changed files with 2 additions and 2 deletions
|
@ -286,8 +286,8 @@ private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) {
|
void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
fstream.open(Common::UTF8ToUTF16W(filename).c_str(), openmode);
|
fstream.open(Common::UTF8ToUTF16W(filename), openmode);
|
||||||
#else
|
#else
|
||||||
fstream.open(filename.c_str(), openmode);
|
fstream.open(filename, openmode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue