From ba97f6a0d3516a19306137bed8df7310bacabfb5 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 6 Jan 2023 13:16:52 -0500 Subject: [PATCH] LibJS: Move the "other" optional completion in the move constructor Otherwise, we invoke a non-trival copy. Caught by clangd. --- Userland/Libraries/LibJS/Runtime/Completion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h index 1ca4fa4260..7c6e144caa 100644 --- a/Userland/Libraries/LibJS/Runtime/Completion.h +++ b/Userland/Libraries/LibJS/Runtime/Completion.h @@ -140,7 +140,7 @@ public: } Optional(Optional&& other) - : m_value(other.m_value) + : m_value(move(other.m_value)) { }