summaryrefslogtreecommitdiff
path: root/hyprpm/src/progress/CProgressBar.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-12-11 16:29:04 +0000
committerGitHub <noreply@github.com>2023-12-11 16:29:04 +0000
commit50648e6bae05136190d604c8cfc585c91dedaa91 (patch)
treee34857cb4c421cbbf1bf49aefe69a73a1511760a /hyprpm/src/progress/CProgressBar.cpp
parent53ce7992beef6320edc40e167b7bf6cc81f9bec2 (diff)
hyprpm: cast std::clamp args to be of the same type (#4116)
hyprpm/src/progress/CProgressBar.cpp:50:27: error: no matching function for call to 'clamp' const auto BARWIDTH = std::clamp(w.ws_col - m_szCurrentMessage.length() - 2, 0UL, 50UL); ^~~~~~~~~~ /usr/include/c++/v1/__algorithm/clamp.h:38:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('size_type' (aka 'unsigned int') vs. 'unsigned long') clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi) ^ /usr/include/c++/v1/__algorithm/clamp.h:27:1: note: candidate function template not viable: requires 4 arguments, but 3 were provided clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp) ^
Diffstat (limited to 'hyprpm/src/progress/CProgressBar.cpp')
-rw-r--r--hyprpm/src/progress/CProgressBar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/hyprpm/src/progress/CProgressBar.cpp b/hyprpm/src/progress/CProgressBar.cpp
index 69f51dd2..45602f82 100644
--- a/hyprpm/src/progress/CProgressBar.cpp
+++ b/hyprpm/src/progress/CProgressBar.cpp
@@ -47,7 +47,7 @@ void CProgressBar::print() {
else
percentDone = (float)m_iSteps / (float)m_iMaxSteps;
- const auto BARWIDTH = std::clamp(w.ws_col - m_szCurrentMessage.length() - 2, 0UL, 50UL);
+ const auto BARWIDTH = std::clamp(w.ws_col - static_cast<unsigned long>(m_szCurrentMessage.length()) - 2, 0UL, 50UL);
// draw bar
message += std::string{" "} + Colors::GREEN;