mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Fixed clazy warnings: pass large objects by reference to const.
This commit is contained in:
@@ -142,13 +142,13 @@ namespace BlackGui
|
||||
ui->tvp_StashAircraftModels->updateContainerMaybeAsync(models);
|
||||
}
|
||||
|
||||
int CDbStashComponent::unstashModels(QSet<int> keys)
|
||||
int CDbStashComponent::unstashModels(const QSet<int> &keys)
|
||||
{
|
||||
if (keys.isEmpty()) { return 0; }
|
||||
return ui->tvp_StashAircraftModels->removeDbKeys(keys);
|
||||
}
|
||||
|
||||
int CDbStashComponent::unstashModels(QStringList modelStrings)
|
||||
int CDbStashComponent::unstashModels(const QStringList &modelStrings)
|
||||
{
|
||||
if (modelStrings.isEmpty()) { return 0; }
|
||||
return ui->tvp_StashAircraftModels->removeModelsWithModelString(modelStrings);
|
||||
|
||||
@@ -74,10 +74,10 @@ namespace BlackGui
|
||||
BlackMisc::CStatusMessage validateStashModel(const BlackMisc::Simulation::CAircraftModel &model, bool allowReplace) const;
|
||||
|
||||
//! Unstash given models with keys
|
||||
int unstashModels(QSet<int> keys);
|
||||
int unstashModels(const QSet<int> &keys);
|
||||
|
||||
//! Unstash given models by model string
|
||||
int unstashModels(QStringList modelStrings);
|
||||
int unstashModels(const QStringList &modelStrings);
|
||||
|
||||
//! Unstash given models
|
||||
int unstashModels(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace BlackGui
|
||||
ui->tw_SpecializedViews->setCurrentIndex(tabIndex);
|
||||
}
|
||||
|
||||
CAircraftModelList CMappingComponent::findModelsStartingWith(const QString modelName, Qt::CaseSensitivity cs)
|
||||
CAircraftModelList CMappingComponent::findModelsStartingWith(const QString &modelName, Qt::CaseSensitivity cs)
|
||||
{
|
||||
Q_ASSERT(ui->tvp_AircraftModels);
|
||||
return ui->tvp_AircraftModels->container().findModelsStartingWith(modelName, cs);
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace BlackGui
|
||||
void setTab(TabWidget tab);
|
||||
|
||||
//! Find models starting with
|
||||
BlackMisc::Simulation::CAircraftModelList findModelsStartingWith(const QString modelName, Qt::CaseSensitivity cs);
|
||||
BlackMisc::Simulation::CAircraftModelList findModelsStartingWith(const QString &modelName, Qt::CaseSensitivity cs);
|
||||
|
||||
signals:
|
||||
//! Request a text message
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace BlackGui
|
||||
styleSheet;
|
||||
}
|
||||
|
||||
bool CTextMessageComponent::isCorrespondingTextMessageTabSelected(CTextMessage textMessage) const
|
||||
bool CTextMessageComponent::isCorrespondingTextMessageTabSelected(const CTextMessage &textMessage) const
|
||||
{
|
||||
if (!this->isVisibleWidgetHack()) { return false; }
|
||||
if (!textMessage.hasValidRecipient()) { return false; }
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace BlackGui
|
||||
void displayInInfoWindow(const BlackMisc::CVariant &message, int displayDurationMs) const;
|
||||
|
||||
//! Command line was entered
|
||||
void commandEntered(const QString commandLine, const BlackMisc::CIdentifier &originator);
|
||||
void commandEntered(const QString &commandLine, const BlackMisc::CIdentifier &originator);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CTextMessageComponent> ui;
|
||||
@@ -137,7 +137,7 @@ namespace BlackGui
|
||||
BlackMisc::Simulation::CSimulatedAircraft getOwnAircraft() const;
|
||||
|
||||
//! For this text message's recepient, is the current tab selected?
|
||||
bool isCorrespondingTextMessageTabSelected(BlackMisc::Network::CTextMessage textMessage) const;
|
||||
bool isCorrespondingTextMessageTabSelected(const BlackMisc::Network::CTextMessage &textMessage) const;
|
||||
|
||||
//! Network connected?
|
||||
bool isNetworkConnected() const;
|
||||
|
||||
Reference in New Issue
Block a user