From 734667998647e21b8ffec9a6ec4e32253af1a9d5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 28 May 2019 17:49:54 -0400 Subject: [PATCH] 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. --- Source/Core/Common/FileUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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