mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Replace "ReadFileToString" with a few semantically clearer wrappers.
This commit is contained in:
1 parent
f0af76ec40
commit
1f129b6dca
15 files changed
+56
-41
No files matched your search
@@ -69,7 +69,7 @@ bool CwCheatScreen::TryLoadCheatInfo() {
|
||||
|
||||
// We won't parse this, just using it to detect changes to the file.
|
||||
std::string str;
|
||||
if (File::ReadFileToString(true, engine_->CheatFilename(), str)) {
|
||||
if (File::ReadTextFileToString(engine_->CheatFilename(), &str)) {
|
||||
fileCheckHash_ = XXH3_64bits(str.c_str(), str.size());
|
||||
}
|
||||
fileCheckCounter_ = 0;
|
||||
@@ -146,7 +146,7 @@ void CwCheatScreen::update() {
|
||||
if (fileCheckCounter_++ >= FILE_CHECK_FRAME_INTERVAL && engine_) {
|
||||
// Check if the file has changed. If it has, we'll reload.
|
||||
std::string str;
|
||||
if (File::ReadFileToString(true, engine_->CheatFilename(), str)) {
|
||||
if (File::ReadTextFileToString(engine_->CheatFilename(), &str)) {
|
||||
uint64_t newHash = XXH3_64bits(str.c_str(), str.size());
|
||||
if (newHash != fileCheckHash_) {
|
||||
// This will update the hash.
|
||||
|
||||
Reference in new issue
Block a user