summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorFelix Dick <felix.dick@web.de>2022-09-26 21:10:24 +0200
committerFelix Dick <felix.dick@web.de>2022-09-26 21:10:24 +0200
commit87afc8c250ba6868c2374ad2a3e0a9374e8f0c1a (patch)
treeb72b7df6c61f380811668416366d8133116d9129 /src/helpers/MiscFunctions.cpp
parentf70b57f360f8117ecca67d6d7f75c1f87b098794 (diff)
Replace clamp with max if there is no upper bound.
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index e699d75a..d7df7bd7 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -254,9 +254,9 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
} else {
if (g_pCompositor->m_pLastMonitor)
- result = std::clamp((int)getPlusMinusKeywordResult(in, g_pCompositor->m_pLastMonitor->activeWorkspace), 1, INT_MAX);
+ result = std::max((int)getPlusMinusKeywordResult(in, g_pCompositor->m_pLastMonitor->activeWorkspace), 1);
else if (isNumber(in))
- result = std::clamp(std::stoi(in), 1, INT_MAX);
+ result = std::max(std::stoi(in), 1);
else {
Debug::log(ERR, "Relative workspace on no mon!");
result = INT_MAX;