Replace "ReadFileToString" with a few semantically clearer wrappers.

This commit is contained in:
Henrik Rydgård committed 2024-01-25 09:55:54 +01:00
1 parent f0af76ec40
commit 1f129b6dca
15 files changed
+56 -41

No files matched your search

+2 -2
View File
@@ -54,7 +54,7 @@ private:
LoongArchCPUInfoParser::LoongArchCPUInfoParser() {
std::string procdata, line;
if (!File::ReadFileToString(true, Path(procfile), procdata))
if (!File::ReadSysTextFileToString(Path(procfile), &procdata))
return;
std::istringstream file(procdata);
@@ -87,7 +87,7 @@ int LoongArchCPUInfoParser::ProcessorCount() {
int LoongArchCPUInfoParser::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);