浏览代码

LibJS: Move the "other" optional completion in the move constructor

Otherwise, we invoke a non-trival copy. Caught by clangd.
Timothy Flynn 2 年之前
父节点
当前提交
ba97f6a0d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibJS/Runtime/Completion.h

+ 1 - 1
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))
     {
     }