mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-26 21:18:44 +00:00
AK: Make HashMap::get(Key) return an Optional<Value>.
This allows HashMap::get() to be used for value types that cannot be default constructed (e.g NonnullOwnPtr.)
This commit is contained in:
@@ -93,7 +93,7 @@ VBWidget* VBForm::widget_at(const Point& position)
|
||||
auto* gwidget = child_at(position);
|
||||
if (!gwidget)
|
||||
return nullptr;
|
||||
return m_gwidget_map.get(gwidget);
|
||||
return m_gwidget_map.get(gwidget).value_or(nullptr);
|
||||
}
|
||||
|
||||
void VBForm::grabber_mousedown_event(GMouseEvent& event, Direction grabber)
|
||||
|
||||
Reference in New Issue
Block a user