Verified Commit 4feeabf0 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/potd: fix incorrect `std::clamp`

parent 1f8f9962
......@@ -169,11 +169,11 @@ int PotdBackend::doesUpdateOverMeteredConnection() const
void PotdBackend::setUpdateOverMeteredConnection(int value)
{
if (m_doesUpdateOverMeteredConnection == std::clamp(0, 2, value)) {
if (m_doesUpdateOverMeteredConnection == std::clamp(value, 0, 2)) {
return;
}
m_doesUpdateOverMeteredConnection = std::clamp(0, 2, value);
m_doesUpdateOverMeteredConnection = std::clamp(value, 0, 2);
Q_EMIT updateOverMeteredConnectionChanged();
#if HAVE_NetworkManagerQt
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment