clang-tidy: use std::move where applicable (#2605)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace chatterino {
|
||||
|
||||
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting)
|
||||
{
|
||||
_actuallyRegisterSetting(setting);
|
||||
_actuallyRegisterSetting(std::move(setting));
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user