mirror of https://github.com/aristocratos/btop.git
Merge pull request #536 from stevenxxiu/fix/ambiguous-format-call
fix: prefix with `fmt::` to fix ambiguous call to `format()`, that also refers to `/usr/include/c++/13.1.1/format`
This commit is contained in:
commit
d64f9939e6
|
@ -196,7 +196,7 @@ void term_resize(bool force) {
|
||||||
sleep_ms(100);
|
sleep_ms(100);
|
||||||
if (Term::width < minWidth or Term::height < minHeight) {
|
if (Term::width < minWidth or Term::height < minHeight) {
|
||||||
int width = Term::width, height = Term::height;
|
int width = Term::width, height = Term::height;
|
||||||
cout << format("{clear}{bg_black}{fg_white}"
|
cout << fmt::format("{clear}{bg_black}{fg_white}"
|
||||||
"{mv1}Terminal size too small:"
|
"{mv1}Terminal size too small:"
|
||||||
"{mv2} Width = {fg_width}{width} {fg_white}Height = {fg_height}{height}"
|
"{mv2} Width = {fg_width}{width} {fg_white}Height = {fg_height}{height}"
|
||||||
"{mv3}{fg_white}Needed for current config:"
|
"{mv3}{fg_white}Needed for current config:"
|
||||||
|
@ -595,7 +595,7 @@ namespace Runner {
|
||||||
if (empty_bg.empty()) {
|
if (empty_bg.empty()) {
|
||||||
const int x = Term::width / 2 - 10, y = Term::height / 2 - 10;
|
const int x = Term::width / 2 - 10, y = Term::height / 2 - 10;
|
||||||
output += Term::clear;
|
output += Term::clear;
|
||||||
empty_bg = format(
|
empty_bg = fmt::format(
|
||||||
"{banner}"
|
"{banner}"
|
||||||
"{mv1}{titleFg}{b}No boxes shown!"
|
"{mv1}{titleFg}{b}No boxes shown!"
|
||||||
"{mv2}{hiFg}1 {mainFg}| Show CPU box"
|
"{mv2}{hiFg}1 {mainFg}| Show CPU box"
|
||||||
|
@ -620,7 +620,7 @@ namespace Runner {
|
||||||
|
|
||||||
//! DEBUG stats -->
|
//! DEBUG stats -->
|
||||||
if (Global::debug and not Menu::active) {
|
if (Global::debug and not Menu::active) {
|
||||||
output += format("{pre}{box:5.5} {collect:>12.12} {draw:>12.12}{post}",
|
output += fmt::format("{pre}{box:5.5} {collect:>12.12} {draw:>12.12}{post}",
|
||||||
"pre"_a = debug_bg + Theme::c("title") + Fx::b,
|
"pre"_a = debug_bg + Theme::c("title") + Fx::b,
|
||||||
"box"_a = "box", "collect"_a = "collect", "draw"_a = "draw",
|
"box"_a = "box", "collect"_a = "collect", "draw"_a = "draw",
|
||||||
"post"_a = Theme::c("main_fg") + Fx::ub
|
"post"_a = Theme::c("main_fg") + Fx::ub
|
||||||
|
@ -629,7 +629,7 @@ namespace Runner {
|
||||||
if (not debug_times.contains(name)) debug_times[name] = {0,0};
|
if (not debug_times.contains(name)) debug_times[name] = {0,0};
|
||||||
const auto& [time_collect, time_draw] = debug_times.at(name);
|
const auto& [time_collect, time_draw] = debug_times.at(name);
|
||||||
if (name == "total") output += Fx::b;
|
if (name == "total") output += Fx::b;
|
||||||
output += format("{mvLD}{name:5.5} {collect:12d} {draw:12d}",
|
output += fmt::format("{mvLD}{name:5.5} {collect:12d} {draw:12d}",
|
||||||
"mvLD"_a = Mv::l(31) + Mv::d(1),
|
"mvLD"_a = Mv::l(31) + Mv::d(1),
|
||||||
"name"_a = name,
|
"name"_a = name,
|
||||||
"collect"_a = time_collect,
|
"collect"_a = time_collect,
|
||||||
|
|
Loading…
Reference in New Issue