Replace clamp with max if there is no upper bound.
This commit is contained in:
parent
f70b57f360
commit
87afc8c250
5 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue