Skip to content

Commit df0358f

Browse files
authored
[lldb-dap] Remove spurious move (NFC) (#140641)
getArgumentsIfRequest is returning a local variable by value. Using std::move is not needed and may inhibit copy elision. Also fixes the braces around a single-line if.
1 parent ae46353 commit df0358f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,10 @@ static std::optional<T> getArgumentsIfRequest(const Message &pm,
873873

874874
T args;
875875
llvm::json::Path::Root root;
876-
if (!fromJSON(req->arguments, args, root)) {
876+
if (!fromJSON(req->arguments, args, root))
877877
return std::nullopt;
878-
}
879878

880-
return std::move(args);
879+
return args;
881880
}
882881

883882
llvm::Error DAP::Loop() {

0 commit comments

Comments
 (0)