mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Common/FileUtil: Use std::string_view with WriteStringToFile
Allows writing out other forms of strings (e.g. C strings) without the need to allocate a std::string and discard it after use.
This commit is contained in:
@ -887,7 +887,7 @@ std::string GetThemeDir(const std::string& theme_name)
|
||||
return GetSysDirectory() + THEMES_DIR "/" DEFAULT_THEME_DIR "/";
|
||||
}
|
||||
|
||||
bool WriteStringToFile(const std::string& filename, const std::string& str)
|
||||
bool WriteStringToFile(const std::string& filename, std::string_view str)
|
||||
{
|
||||
return File::IOFile(filename, "wb").WriteBytes(str.data(), str.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user