From e4593ba0db880b57febbbc9a87e0c4e7bd9a8a70 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sun, 27 Mar 2022 11:38:59 -0700 Subject: [PATCH] We no longer need to manually escape percent signs in TransportWindow. --- src/musikcube/app/window/TransportWindow.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/musikcube/app/window/TransportWindow.cpp b/src/musikcube/app/window/TransportWindow.cpp index a3db7420b..1ccd7bfec 100755 --- a/src/musikcube/app/window/TransportWindow.cpp +++ b/src/musikcube/app/window/TransportWindow.cpp @@ -351,14 +351,6 @@ size_t TransportWindow::WritePlayingFormat(WINDOW *w, size_t width) { } } - /* any % in the value string might be parsed by wprintw, so replace it */ - std::size_t percentSignIndex = value.find("%"); - while (percentSignIndex != std::string::npos) { - value.replace(percentSignIndex, 1, "%%"); - /* we replaced one % with 2 of them, so we need to skip ahead 2 chars */ - percentSignIndex = value.find("%", percentSignIndex + 2); - } - getyx(w, y, x); metadataFieldToPosition[token->value] = Position(x, y, cols); @@ -716,7 +708,7 @@ void TransportWindow::Update(TimeMode timeMode) { } volume += u8fmt(" %d", static_cast(std::round(this->transport.Volume() * 100))); - volume += replayGainEnabled ? "%% " : "%% "; + volume += replayGainEnabled ? "% " : "% "; } /* repeat mode setup */