changes for c++20

This commit is contained in:
2026-03-19 00:34:39 +01:00
parent 196123ee42
commit 0ba5d49758

View File

@@ -32,8 +32,8 @@ void sys::getTimeDate(TimeDate* td) {
void sys::getRam(Memory* mem) {
static std::array<char, 128> buf; // file is longer but we only need first 128 chars
utils::readFile("/proc/meminfo", buf);
mem->free = getVal("MemAvailable:", std::string_view(buf));
mem->total = getVal("MemTotal:", std::string_view(buf)); // shouldn't really update this on each loop
mem->free = getVal("MemAvailable:", buf.data());
mem->total = getVal("MemTotal:", buf.data()); // shouldn't really update this on each loop
mem->used = mem->total - mem->free;
}