mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
AK: Improve smart pointer ergonomics a bit.
This commit is contained in:
parent
d5dec1922b
commit
3f6408919f
Notes:
sideshowbarker
2024-07-19 14:43:36 +09:00
Author: https://github.com/awesomekling
Commit: 3f6408919f
17 changed files with 49 additions and 31 deletions
|
@ -15,7 +15,7 @@ GAbstractView::~GAbstractView()
|
|||
|
||||
void GAbstractView::set_model(RetainPtr<GModel>&& model)
|
||||
{
|
||||
if (model.ptr() == m_model.ptr())
|
||||
if (model == m_model)
|
||||
return;
|
||||
if (m_model)
|
||||
m_model->unregister_view(Badge<GAbstractView>(), *this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue