clang-tidy: use std::move where applicable (#2605)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Yoitsu
2021-04-10 15:34:40 +03:00
committed by GitHub
parent b0fee78f2b
commit 00ccdbc781
20 changed files with 39 additions and 38 deletions
+3 -3
View File
@@ -320,13 +320,13 @@ void Channel::onConnected()
// Indirect channel
//
IndirectChannel::Data::Data(ChannelPtr _channel, Channel::Type _type)
: channel(_channel)
: channel(std::move(_channel))
, type(_type)
{
}
IndirectChannel::IndirectChannel(ChannelPtr channel, Channel::Type type)
: data_(std::make_unique<Data>(channel, type))
: data_(std::make_unique<Data>(std::move(channel), type))
{
}
@@ -339,7 +339,7 @@ void IndirectChannel::reset(ChannelPtr channel)
{
assert(this->data_->type != Channel::Type::Direct);
this->data_->channel = channel;
this->data_->channel = std::move(channel);
this->data_->changed.invoke();
}