From 386e651edf9d82c9537e0598bc9e12f8764f4cdc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 30 Aug 2024 14:27:49 +0200 Subject: [PATCH] SongRowPaint, StatusBar: use {} initializer syntax for Point Some compilers don't like using the implicit constructor for initializing fields (looking at you, Apple!) --- src/SongRowPaint.cxx | 4 ++-- src/SongRowPaint.hxx | 2 +- src/StatusBar.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SongRowPaint.cxx b/src/SongRowPaint.cxx index 40144318..19bf1952 100644 --- a/src/SongRowPaint.cxx +++ b/src/SongRowPaint.cxx @@ -14,7 +14,7 @@ #include void -paint_song_row(WINDOW *w, [[maybe_unused]] unsigned y, unsigned width, +paint_song_row(WINDOW *w, [[maybe_unused]] int y, unsigned width, bool selected, bool highlight, const struct mpd_song *song, [[maybe_unused]] class hscroll *hscroll, const char *format) { @@ -37,7 +37,7 @@ paint_song_row(WINDOW *w, [[maybe_unused]] unsigned y, unsigned width, if (hscroll != nullptr && width > 3 && StringWidthMB(buffer) >= width) { - hscroll->Set(Point(0, y), width, buffer, + hscroll->Set({0, y}, width, buffer, highlight ? Style::LIST_BOLD : Style::LIST, selected ? A_REVERSE : 0); hscroll->Paint(); diff --git a/src/SongRowPaint.hxx b/src/SongRowPaint.hxx index d2f7fb56..ed1c4925 100644 --- a/src/SongRowPaint.hxx +++ b/src/SongRowPaint.hxx @@ -23,7 +23,7 @@ class hscroll; * @param format the song format */ void -paint_song_row(WINDOW *w, unsigned y, unsigned width, +paint_song_row(WINDOW *w, int y, unsigned width, bool selected, bool highlight, const struct mpd_song *song, class hscroll *hscroll, const char *format); diff --git a/src/StatusBar.cxx b/src/StatusBar.cxx index 5d3357a0..4b589bb0 100644 --- a/src/StatusBar.cxx +++ b/src/StatusBar.cxx @@ -186,7 +186,7 @@ StatusBar::Update(const struct mpd_status *status, const unsigned center_width = StringWidthMB(center_text.c_str()); if (width > 3 && center_width > (unsigned)width) { - hscroll.Set(Point(left_width, 0), width, + hscroll.Set({(int)left_width, 0}, width, center_text.c_str(), Style::STATUS); } else {