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:
parent
c0f499b7f7
commit
7346679986
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue