mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Fix Clang warnings
This commit is contained in:
@@ -166,7 +166,7 @@ namespace BlackMisc
|
||||
CUpdateInfo result;
|
||||
result.m_distributions = { alphaDistribution, betaDistribution };
|
||||
|
||||
for (const QJsonValue &release : QJsonDocument::fromJson(jsonData).array())
|
||||
for (const QJsonValue release : QJsonDocument::fromJson(jsonData).array())
|
||||
{
|
||||
QString version = release[QLatin1String("tag_name")].toString();
|
||||
if (version.isEmpty() || version[0] != 'v') { continue; }
|
||||
@@ -176,7 +176,7 @@ namespace BlackMisc
|
||||
bool existing = !release[QLatin1String("draft")].toBool();
|
||||
bool alpha = release[QLatin1String("prerelease")].toBool();
|
||||
|
||||
for (const QJsonValue &asset : release[QLatin1String("assets")].toArray())
|
||||
for (const QJsonValue asset : release[QLatin1String("assets")].toArray())
|
||||
{
|
||||
QString name = asset[QLatin1String("name")].toString();
|
||||
QString filename = QStringLiteral("v%1/%2").arg(version, name);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (client != this) { channels.unite(client->m_subscriptions.keys().toSet()); }
|
||||
}
|
||||
for (const auto channel : channels)
|
||||
for (const auto &channel : channels)
|
||||
{
|
||||
requestPeerSubscriptions(channel);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace BlackMisc
|
||||
{
|
||||
QString result;
|
||||
// QChar c (NOT QChar &c), see https://discordapp.com/channels/539048679160676382/539925070550794240/686321311076581440
|
||||
for (const QChar c : s)
|
||||
for (const QChar &c : s)
|
||||
{
|
||||
if (c.decompositionTag() == QChar::NoDecomposition)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ namespace BlackMisc
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QChar dc : c.decomposition())
|
||||
for (const QChar &dc : c.decomposition())
|
||||
{
|
||||
if (!dc.isMark()) { result.push_back(dc); }
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace BlackMisc
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexOffsetMs = CPropertyIndexRef::GlobalIndexITimestampBased + ITimestampBased::IndexMSecsSinceEpoch + 1,
|
||||
IndexOffsetMs = static_cast<int>(CPropertyIndexRef::GlobalIndexITimestampBased) + ITimestampBased::IndexMSecsSinceEpoch + 1,
|
||||
IndexAdjustedMsWithOffset,
|
||||
IndexOffsetWithUnit // keep this as last item
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user