mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:15:07 +00:00
LibGUI: Use clamp() is various places
This commit is contained in:
parent
b52d0afecf
commit
b25210ee1b
4 changed files with 7 additions and 29 deletions
|
@ -53,10 +53,7 @@ void GProgressBar::set_range(int min, int max)
|
|||
ASSERT(min < max);
|
||||
m_min = min;
|
||||
m_max = max;
|
||||
if (m_value > m_max)
|
||||
m_value = m_max;
|
||||
if (m_value < m_min)
|
||||
m_value = m_min;
|
||||
m_value = clamp(m_value, m_min, m_max);
|
||||
}
|
||||
|
||||
void GProgressBar::paint_event(GPaintEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue