1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Everywhere: Use the Optional<T>::operator==(T) operator

In general, I think `opt == x` looks much nicer than
`opt.has_value() && opt.value() == x`, so I'm updating
the remaining few instances I could find with some regex
magic in my search.
This commit is contained in:
Mustafa Quraish 2021-08-27 11:30:23 -04:00 committed by Andreas Kling
parent 2dc614127e
commit 75a706b6eb
2 changed files with 5 additions and 5 deletions

View file

@ -307,7 +307,7 @@ void LayerListWidget::relayout_gadgets()
for (auto& gadget : m_gadgets) {
if (gadget.is_moving)
continue;
if (hole_index.has_value() && index == hole_index.value())
if (index == hole_index)
y += vertical_step;
gadget.rect = { 0, y, widget_inner_rect().width(), gadget_height };
y += vertical_step;