move from iostream to print
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <print>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utils.hpp>
|
||||
@@ -11,7 +11,7 @@ std::string readFile(std::string path, uint8_t trim) {
|
||||
std::stringstream ss;
|
||||
std::ifstream fs(path);
|
||||
if (!fs.good()) {
|
||||
std::cerr << "[readFile] Error reading " << path << std::endl;
|
||||
std::println("[readFile] Error reading {}", path);
|
||||
return "";
|
||||
}
|
||||
ss << fs.rdbuf();
|
||||
@@ -38,7 +38,7 @@ std::string findHwmonPath(std::string module) {
|
||||
auto f = readFile("/sys/class/hwmon/hwmon" + std::to_string(id) + "/name");
|
||||
if (f.size() == 0) break;
|
||||
if (f == module) {
|
||||
std::cout << ("[Hwmon] Detected " + module + " path is " + "/sys/class/hwmon/hwmon" + std::to_string(id)) << std::endl;
|
||||
std::println("[Hwmon] Detected {} path is /sys/class/hwmon/hwmon{}", module, id);
|
||||
return "/sys/class/hwmon/hwmon" + std::to_string(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user