convert std::cout and std::cerr to std::println()
Describe your PR, what does it fix/add?
follow up from #8034
std::print() is easier to use and read, it also has better performance and reduces boilerplate code https://vitaut.net/posts/2023/print-in-cpp23/
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
So I have almost converted every instance of std::cout, I only left some for example where hyprpm prints the warning message when adding a plugin and there were too many Colors, so I left those for the sake of readability.
I have added hyprpm/src/helpers/StringUtils.hpp which is useful to replace the boilerplate such as
std::cout << Colors::BLUE << "[v] " << Colors::RESET << "version returned: " << HLVERCALL << "\n";
with
std::println("{}", verboseString("version returned: {}", HLVERCALL));
Is it ready for merging, or does it need work?
Yeah, hope I didn't do too much or some things must be in a separeted MR. This took me the whole day. Did some tests and seems good so far
is the indetion good? 1st: current, 2nd: my MR
is the indetion good? 1st: current, 2nd: my MR
ye thats whatever both look alr
also if you could split those into 3 commits:
- hyprland
- hyprpm
- hyprctl
then I could just rebase it on main.
Sorry wdym? Like re-creating these 5 commits in 3 and separated by categories?
Sorry wdym? Like re-creating these 5 commits in 3 and separated by categories?
Squash all commits into one, then split that one commit into three, each changing only one component (hyprland, hyprctl, hyprpm)
so it's
- hyprland: convert std::cout and std::cerr to std::println
- hyprpm: convert std::cout and std::cerr to std::println
- hyprctl: convert std::cout and std::cerr to std::println
Sorry wdym? Like re-creating these 5 commits in 3 and separated by categories?
Squash all commits into one, then split that one commit into three, each changing only one component (hyprland, hyprctl, hyprpm)
so it's
- hyprland: convert std::cout and std::cerr to std::println
- hyprpm: convert std::cout and std::cerr to std::println
- hyprctl: convert std::cout and std::cerr to std::println
done
btw bump VERSION to 0.44.1
btw bump VERSION to 0.44.1
no
let me know if there is anything else I missed or should changes, so I can rebase into 3 commits again
also fixed some status printing generally
can you squash those again so that there are only 3 commits :P
yeah ofc, was just waiting for approval