From e5bb8b4afe6df99205fc92b46a796b99f8f66a66 Mon Sep 17 00:00:00 2001 From: Undefine Date: Sat, 31 Oct 2026 21:48:14 +0100 Subject: [PATCH] LibACPI: Allow initializing an Object by moving a value --- Userland/Libraries/LibACPI/Interpreter.cpp | 2 +- Userland/Libraries/LibACPI/Object.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibACPI/Interpreter.cpp b/Userland/Libraries/LibACPI/Interpreter.cpp index 98903940f4f..5a68cd970a9 100644 --- a/Userland/Libraries/LibACPI/Interpreter.cpp +++ b/Userland/Libraries/LibACPI/Interpreter.cpp @@ -317,7 +317,7 @@ ErrorOr Interpreter::read_operand(TableStream& stream, Operan case OperandType::NameString: { auto value = TRY(stream.read_name_string()); DEBUG_LOG("Reading namestring... ({})", value.to_string()); - TRY(top_opcode_frame.finish_operand(value, stream.offset())); + TRY(top_opcode_frame.finish_operand(move(value), stream.offset())); return IterationDecision::Continue; } case OperandType::PackageLength: { diff --git a/Userland/Libraries/LibACPI/Object.h b/Userland/Libraries/LibACPI/Object.h index 10230aa59fe..d0dd6e4d402 100644 --- a/Userland/Libraries/LibACPI/Object.h +++ b/Userland/Libraries/LibACPI/Object.h @@ -74,8 +74,8 @@ public: } template - constexpr Object(T const& value) - : m_data(value) + constexpr Object(T&& value) + : m_data(forward(value)) { }