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
@@ -60,7 +60,7 @@ private:
|
||||
|
||||
RiscVCPUInfoParser::RiscVCPUInfoParser() {
|
||||
std::string procdata, line;
|
||||
if (!File::ReadFileToString(true, Path(procfile), procdata))
|
||||
if (!File::ReadSysTextFileToString(Path(procfile), &procdata))
|
||||
return;
|
||||
|
||||
std::istringstream file(procdata);
|
||||
@@ -94,7 +94,7 @@ int RiscVCPUInfoParser::ProcessorCount() {
|
||||
|
||||
int RiscVCPUInfoParser::TotalLogicalCount() {
|
||||
std::string presentData, line;
|
||||
bool presentSuccess = File::ReadFileToString(true, Path(syscpupresentfile), presentData);
|
||||
bool presentSuccess = File::ReadSysTextFileToString(Path(syscpupresentfile), &presentData);
|
||||
if (presentSuccess) {
|
||||
std::istringstream presentFile(presentData);
|
||||
|
||||
@@ -136,7 +136,7 @@ bool RiscVCPUInfoParser::FirmwareMatchesCompatible(const std::string &str) {
|
||||
firmwareLoaded_ = true;
|
||||
|
||||
std::string data;
|
||||
if (!File::ReadFileToString(true, Path(firmwarefile), data))
|
||||
if (!File::ReadSysTextFileToString(Path(firmwarefile), &data))
|
||||
return false;
|
||||
|
||||
SplitString(data, '\0', firmware_);
|
||||
|
||||
Reference in new issue
Block a user