mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-07 23:28:36 -06:00
cmServerConnection: make return conversions explicit
GCC 9 warns that `std::move` is not necessary, but in fact it is necessary to call the proper conversion constructor. Make that call explicit.
This commit is contained in:
@@ -29,7 +29,7 @@ cm::uv_stream_ptr cmStdIoConnection::SetupStream(int file_id)
|
|||||||
tty.init(*this->Server->GetLoop(), file_id, file_id == 0,
|
tty.init(*this->Server->GetLoop(), file_id, file_id == 0,
|
||||||
static_cast<cmEventBasedConnection*>(this));
|
static_cast<cmEventBasedConnection*>(this));
|
||||||
uv_tty_set_mode(tty, UV_TTY_MODE_NORMAL);
|
uv_tty_set_mode(tty, UV_TTY_MODE_NORMAL);
|
||||||
return std::move(tty);
|
return { std::move(tty) };
|
||||||
}
|
}
|
||||||
case UV_FILE:
|
case UV_FILE:
|
||||||
if (file_id == 0) {
|
if (file_id == 0) {
|
||||||
@@ -43,7 +43,7 @@ cm::uv_stream_ptr cmStdIoConnection::SetupStream(int file_id)
|
|||||||
pipe.init(*this->Server->GetLoop(), 0,
|
pipe.init(*this->Server->GetLoop(), 0,
|
||||||
static_cast<cmEventBasedConnection*>(this));
|
static_cast<cmEventBasedConnection*>(this));
|
||||||
uv_pipe_open(pipe, file_id);
|
uv_pipe_open(pipe, file_id);
|
||||||
return std::move(pipe);
|
return { std::move(pipe) };
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
assert(false && "Unable to determine stream type");
|
assert(false && "Unable to determine stream type");
|
||||||
|
|||||||
Reference in New Issue
Block a user