diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-05-28 17:47:26 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-05-29 07:06:56 -0400 |
| commit | c0f499b7f7e84e490d20f3b999714f3f5b43544e (patch) | |
| tree | 01fd35fd506109c460a326bafaaa4897c1d86118 /Source/Core/Common/FileUtil.cpp | |
| parent | eb475025b85686f4793bb83bac377033c17fbd2d (diff) | |
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.
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 826d430b62..01f4417e1d 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -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()); } |
