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.
This commit is contained in:
Lioncash 2019-05-28 17:49:54 -04:00
parent c0f499b7f7
commit 7346679986
1 changed files with 1 additions and 1 deletions

View File

@ -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