summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-15 23:26:15 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-16 17:17:13 +0200
commit889ade06fe132c1f5811ec5c4e4063dc004b3bdf (patch)
treeabb59c9084d417843d690f527f86e203c85dbfb7 /Userland/Libraries/LibWeb
parent2b570181966dc3eda3eb17493f5ad2da1d03f642 (diff)
downloadserenity-889ade06fe132c1f5811ec5c4e4063dc004b3bdf.zip
LibWeb: Use explicit move to avoid unnecessary RefPtr ref / unref
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp2
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 05984f2ac4..189c48ae10 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -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);
}
diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h
index 5ac4254e40..0b1b4436fc 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.h
+++ b/Userland/Libraries/LibWeb/DOM/Document.h
@@ -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++; }