Skip to content

Commit b8c3683

Browse files
committed
[lldb] [Host/SerialPort] Add std::moves for better compatibility
1 parent cbe7898 commit b8c3683

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/source/Host/common/File.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -821,20 +821,20 @@ SerialPort::Create(int fd, OpenOptions options, Options serial_options,
821821

822822
Terminal term{fd};
823823
if (llvm::Error error = term.SetRaw())
824-
return error;
824+
return std::move(error);
825825
if (serial_options.BaudRate) {
826826
if (llvm::Error error =
827827
term.SetBaudRate(serial_options.BaudRate.getValue()))
828-
return error;
828+
return std::move(error);
829829
}
830830
if (serial_options.Parity) {
831831
if (llvm::Error error = term.SetParity(serial_options.Parity.getValue()))
832-
return error;
832+
return std::move(error);
833833
}
834834
if (serial_options.StopBits) {
835835
if (llvm::Error error =
836836
term.SetStopBits(serial_options.StopBits.getValue()))
837-
return error;
837+
return std::move(error);
838838
}
839839

840840
return out;

0 commit comments

Comments
 (0)