mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 10:15:43 +08:00
refs #937 Resolved clazy warnings: pass-by-value/reference.
This commit is contained in:
@@ -278,7 +278,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray CNetworkVatlib::toFSD(QString qstr) const
|
||||
QByteArray CNetworkVatlib::toFSD(const QString &qstr) const
|
||||
{
|
||||
Q_ASSERT_X(m_fsdTextCodec, Q_FUNC_INFO, "Missing codec");
|
||||
return m_fsdTextCodec->fromUnicode(qstr);
|
||||
@@ -289,7 +289,7 @@ namespace BlackCore
|
||||
return toFSD(callsign.getStringAsSet());
|
||||
}
|
||||
|
||||
std::function<const char **()> CNetworkVatlib::toFSD(QStringList qstrList) const
|
||||
std::function<const char **()> CNetworkVatlib::toFSD(const QStringList &qstrList) const
|
||||
{
|
||||
QVector<QByteArray> bytesVec;
|
||||
for (auto i = qstrList.cbegin(); i != qstrList.cend(); ++i)
|
||||
|
||||
@@ -163,9 +163,9 @@ namespace BlackCore
|
||||
static void onCustomPacketReceived(VatSessionID, const char *callsign, const char *packetId, const char **data, int dataSize, void *cbvar);
|
||||
//! @}
|
||||
|
||||
QByteArray toFSD(QString qstr) const;
|
||||
QByteArray toFSD(const QString &qstr) const;
|
||||
QByteArray toFSD(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
std::function<const char **()> toFSD(QStringList qstrList) const;
|
||||
std::function<const char **()> toFSD(const QStringList &qstrList) const;
|
||||
QString fromFSD(const char *cstr) const;
|
||||
QStringList fromFSD(const char **cstrArray, int size) const;
|
||||
bool isInterimPositionUpdateEnabledForServer() const;
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace BlackCore
|
||||
Section section = SectionNone;
|
||||
|
||||
QString currentLine; // declared outside of the for loop, to amortize the cost of allocation
|
||||
for (QStringRef clRef : lines)
|
||||
for (const QStringRef &clRef : lines)
|
||||
{
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace BlackCore
|
||||
CUrlList metarFileUrls;
|
||||
|
||||
QString currentLine; // declared outside of the for loop, to amortize the cost of allocation
|
||||
for (QStringRef clRef : lines)
|
||||
for (const QStringRef &clRef : lines)
|
||||
{
|
||||
if (this->isAbandoned())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user