diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-05-28 17:49:54 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-05-29 07:06:56 -0400 |
| commit | 734667998647e21b8ffec9a6ec4e32253af1a9d5 (patch) | |
| tree | 88e179cf1b544f3954f5adc2a9d8aae5ec96526f /Source/Core/Common/FileUtil.cpp | |
| parent | c0f499b7f7e84e490d20f3b999714f3f5b43544e (diff) | |
Common/FileUtil: Use std::string::data within ReadFileToString
With C++17, .data() for std::string now has a non-const overload, so we
can make use of that instead of taking the address of the first element.
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 01f4417e1d..75118bffac 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -900,7 +900,7 @@ bool ReadFileToString(const std::string& filename, std::string& str) return false; str.resize(file.GetSize()); - return file.ReadArray(&str[0], str.size()); + return file.ReadArray(str.data(), str.size()); } } // namespace File |
