1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

LibWeb: Use explicit move to avoid unnecessary RefPtr ref / unref

This commit is contained in:
Brian Gianforcaro 2021-09-15 23:26:15 -07:00 committed by Andreas Kling
parent 2b57018196
commit 889ade06fe
2 changed files with 2 additions and 2 deletions

View file

@ -263,7 +263,7 @@ void StyleProperties::load_font(Layout::Node const& node) const
found_font = font_fallback(monospace, bold);
}
m_font = found_font;
m_font = move(found_font);
FontCache::the().set(font_selector, *m_font);
}

View file

@ -264,7 +264,7 @@ public:
const NonnullRefPtr<DOMImplementation> implementation() const { return m_implementation; }
RefPtr<HTML::HTMLScriptElement> current_script() const { return m_current_script; }
void set_current_script(Badge<HTML::HTMLScriptElement>, RefPtr<HTML::HTMLScriptElement> script) { m_current_script = script; }
void set_current_script(Badge<HTML::HTMLScriptElement>, RefPtr<HTML::HTMLScriptElement> script) { m_current_script = move(script); }
u32 ignore_destructive_writes_counter() const { return m_ignore_destructive_writes_counter; }
void increment_ignore_destructive_writes_counter() { m_ignore_destructive_writes_counter++; }