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
+1 -1
View File
@@ -106,7 +106,7 @@ void Args::applyCustomChannelLayout(const QString &argValue)
return QRect(-1, -1, -1, -1);
}();
window.geometry_ = std::move(configMainLayout);
window.geometry_ = configMainLayout;
QStringList channelArgList = argValue.split(";");
for (const QString &channelArg : channelArgList)
+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();
}
+1 -1
View File
@@ -6,7 +6,7 @@ namespace chatterino {
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting)
{
_actuallyRegisterSetting(setting);
_actuallyRegisterSetting(std::move(setting));
}
} // namespace chatterino