refs #937 Resolved clazy warnings: pass-by-value/reference.

This commit is contained in:
Mathew Sutcliffe
2017-04-15 01:26:30 +01:00
parent b7f69c6887
commit 3ea9e33e6b
69 changed files with 166 additions and 166 deletions

View File

@@ -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)

View File

@@ -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;

View File

@@ -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())
{

View File

@@ -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())
{