Removed move for trivially-copyable type and added noexcept for move constructor

This commit is contained in:
Larry Luo 2022-05-02 18:46:34 -07:00
parent 042157efca
commit ee131eefd8
3 changed files with 3 additions and 3 deletions

View File

@ -410,7 +410,7 @@ Packet LocalConnection::receivePacket()
{
if (state->profile_info)
{
packet.profile_info = std::move(*state->profile_info);
packet.profile_info = *state->profile_info;
state->profile_info.reset();
}
next_packet_type.reset();

View File

@ -219,7 +219,7 @@ private:
struct FileSegmentsHolder : private boost::noncopyable
{
explicit FileSegmentsHolder(FileSegments && file_segments_) : file_segments(std::move(file_segments_)) {}
FileSegmentsHolder(FileSegmentsHolder && other) : file_segments(std::move(other.file_segments)) {}
FileSegmentsHolder(FileSegmentsHolder && other) noexcept : file_segments(std::move(other.file_segments)) {}
~FileSegmentsHolder();

View File

@ -37,7 +37,7 @@ BlockIO & BlockIO::operator= (BlockIO && rhs) noexcept
finish_callback = std::move(rhs.finish_callback);
exception_callback = std::move(rhs.exception_callback);
null_format = std::move(rhs.null_format);
null_format = rhs.null_format;
return *this;
}