hyprpm: convert std::cout and std::cerr to std::println()

This commit is contained in:
Toni500git 2024-10-13 14:23:33 +02:00 committed by Vaxry
parent 1822707c7e
commit e79d3cd2ef
7 changed files with 202 additions and 159 deletions

View file

@ -1,6 +1,6 @@
#include "DataState.hpp"
#include <toml++/toml.hpp>
#include <iostream>
#include <print>
#include <filesystem>
#include <fstream>
#include "PluginManager.hpp"
@ -8,7 +8,7 @@
std::string DataState::getDataStatePath() {
const auto HOME = getenv("HOME");
if (!HOME) {
std::cerr << "DataState: no $HOME\n";
std::println(stderr, "DataState: no $HOME");
throw std::runtime_error("no $HOME");
return "";
}
@ -242,4 +242,4 @@ bool DataState::setPluginEnabled(const std::string& name, bool enabled) {
}
return false;
}
}