mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 07:35:53 +08:00
refactor: Fix readability-redundant-member-init warning
This commit is contained in:
@@ -44,6 +44,7 @@ Checks: >
|
||||
modernize-use-using,
|
||||
readability-use-std-min-max,
|
||||
readability-use-anyofallof,
|
||||
readability-redundant-member-init,
|
||||
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
AddAtc::AddAtc() : MessageBase() {}
|
||||
|
||||
AddAtc::AddAtc(const QString &callsign, const QString &realName, const QString &cid, const QString &password,
|
||||
AtcRating rating, int protocolRevision)
|
||||
: MessageBase(callsign, "SERVER"), m_cid(cid), m_password(password), m_rating(rating),
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace swift::core::fsd
|
||||
QString realName() const { return m_realName; }
|
||||
|
||||
private:
|
||||
AddAtc();
|
||||
AddAtc() = default;
|
||||
|
||||
QString m_cid;
|
||||
QString m_password;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace swift::core::fsd
|
||||
static QString pdu() { return "#AP"; }
|
||||
|
||||
private:
|
||||
AddPilot() : MessageBase() {}
|
||||
AddPilot() = default;
|
||||
|
||||
QString m_cid;
|
||||
QString m_password;
|
||||
|
||||
@@ -11,8 +11,6 @@ using namespace swift::misc::network;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
AtcDataUpdate::AtcDataUpdate() : MessageBase() {}
|
||||
|
||||
AtcDataUpdate::AtcDataUpdate(const QString &sender, int frequencykHz, CFacilityType facility, int visibleRange,
|
||||
AtcRating rating, double latitude, double longitude, int elevation)
|
||||
: MessageBase(sender, {}), m_frequencykHz(frequencykHz), m_facility(facility), m_visibleRange(visibleRange),
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace swift::core::fsd
|
||||
|
||||
private:
|
||||
//! Ctor
|
||||
AtcDataUpdate();
|
||||
AtcDataUpdate() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
AuthChallenge::AuthChallenge() : MessageBase() {}
|
||||
|
||||
AuthChallenge::AuthChallenge(const QString &sender, const QString &target, const QString &challengeKey)
|
||||
: MessageBase(sender, target), m_challengeKey(challengeKey)
|
||||
{}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace swift::core::fsd
|
||||
|
||||
private:
|
||||
//! Ctor
|
||||
AuthChallenge();
|
||||
AuthChallenge() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
AuthResponse::AuthResponse() : MessageBase() {}
|
||||
|
||||
AuthResponse::AuthResponse(const QString &sender, const QString &receiver, const QString &response)
|
||||
: MessageBase(sender, receiver), m_response(response)
|
||||
{}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace swift::core::fsd
|
||||
QString m_response; //!< response
|
||||
|
||||
private:
|
||||
AuthResponse();
|
||||
AuthResponse() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
ClientIdentification::ClientIdentification() : MessageBase() {}
|
||||
|
||||
ClientIdentification::ClientIdentification(const QString &sender, quint16 clientId, const QString &clientName,
|
||||
int clientVersionMajor, int clientVersionMinor, const QString &userCid,
|
||||
const QString &sysUid, const QString &initialChallenge)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
ClientIdentification();
|
||||
ClientIdentification() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
ClientQuery::ClientQuery() : MessageBase() {}
|
||||
|
||||
ClientQuery::ClientQuery(const QString &sender, const QString &clientToBeQueried, ClientQueryType queryType,
|
||||
const QStringList &queryData)
|
||||
: MessageBase(sender, clientToBeQueried), m_queryType(queryType), m_queryData(queryData)
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
ClientQuery();
|
||||
ClientQuery() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
DeleteAtc::DeleteAtc() : MessageBase() {}
|
||||
|
||||
DeleteAtc::DeleteAtc(const QString &sender, const QString &cid) : MessageBase(sender), m_cid(cid) {}
|
||||
|
||||
QStringList DeleteAtc::toTokens() const
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace swift::core::fsd
|
||||
QString m_cid; //!< id
|
||||
|
||||
private:
|
||||
DeleteAtc();
|
||||
DeleteAtc() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -9,8 +9,6 @@ using namespace swift::misc;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
DeletePilot::DeletePilot() : MessageBase() {}
|
||||
|
||||
DeletePilot::DeletePilot(const QString &callsign, const QString &id) : MessageBase(callsign), m_cid(id) {}
|
||||
|
||||
QStringList DeletePilot::toTokens() const
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace swift::core::fsd
|
||||
|
||||
private:
|
||||
//! Ctor
|
||||
DeletePilot();
|
||||
DeletePilot() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
FSDIdentification::FSDIdentification() : MessageBase() {}
|
||||
|
||||
FSDIdentification::FSDIdentification(const QString &callsign, const QString &receiver, const QString &serverVersion,
|
||||
const QString &initialChallenge)
|
||||
: MessageBase(callsign, receiver), m_serverVersion(serverVersion), m_initialChallenge(initialChallenge)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
FSDIdentification();
|
||||
FSDIdentification() = default;
|
||||
};
|
||||
} // namespace swift::core::fsd
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
InterimPilotDataUpdate::InterimPilotDataUpdate() : MessageBase() {}
|
||||
|
||||
InterimPilotDataUpdate::InterimPilotDataUpdate(const QString &sender, const QString &receiver, double latitude,
|
||||
double longitude, int altitudeTrue, int groundSpeed, double pitch,
|
||||
double bank, double heading, bool onGround)
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
InterimPilotDataUpdate();
|
||||
InterimPilotDataUpdate() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
KillRequest::KillRequest() : MessageBase() {}
|
||||
|
||||
KillRequest::KillRequest(const QString &callsign, const QString &receiver, const QString &reason)
|
||||
: MessageBase(callsign, receiver), m_reason(reason)
|
||||
{}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace swift::core::fsd
|
||||
QString m_reason; //!< reason for kill request/kicked
|
||||
|
||||
private:
|
||||
KillRequest();
|
||||
KillRequest() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -12,8 +12,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
PilotDataUpdate::PilotDataUpdate() : MessageBase() {}
|
||||
|
||||
PilotDataUpdate::PilotDataUpdate(CTransponder::TransponderMode transponderMode, const QString &sender,
|
||||
int transponderCode, PilotRating rating, double latitude, double longitude,
|
||||
int altitudeTrue, int altitudePressure, int groundSpeed, double pitch, double bank,
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
PilotDataUpdate();
|
||||
PilotDataUpdate() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
Ping::Ping() : MessageBase() {}
|
||||
|
||||
Ping::Ping(const QString &sender, const QString &receiver, const QString ×tamp)
|
||||
: MessageBase(sender, receiver), m_timestamp(timestamp)
|
||||
{}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace swift::core::fsd
|
||||
QString m_timestamp; //!< timestamp
|
||||
|
||||
private:
|
||||
Ping();
|
||||
Ping() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
PlaneInfoRequest::PlaneInfoRequest() : MessageBase() {}
|
||||
|
||||
PlaneInfoRequest::PlaneInfoRequest(const QString &sender, const QString &receiver) : MessageBase(sender, receiver)
|
||||
{}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace swift::core::fsd
|
||||
static QString pdu() { return QStringLiteral("#SB"); }
|
||||
|
||||
private:
|
||||
PlaneInfoRequest();
|
||||
PlaneInfoRequest() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
PlaneInfoRequestFsinn::PlaneInfoRequestFsinn() : MessageBase() {}
|
||||
|
||||
PlaneInfoRequestFsinn::PlaneInfoRequestFsinn(const QString &sender, const QString &receiver,
|
||||
const QString &airlineIcao, const QString &aircraftIcao,
|
||||
const QString &aircraftIcaoCombinedType,
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
PlaneInfoRequestFsinn();
|
||||
PlaneInfoRequestFsinn() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
PlaneInformation::PlaneInformation() : MessageBase() {}
|
||||
|
||||
PlaneInformation::PlaneInformation(const QString &sender, const QString &receiver, const QString &aircraft,
|
||||
const QString &airline = QString(), const QString &livery = QString())
|
||||
: MessageBase(sender, receiver), m_aircraft(aircraft), m_airline(airline), m_livery(livery)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
PlaneInformation();
|
||||
PlaneInformation() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
PlaneInformationFsinn::PlaneInformationFsinn() : MessageBase() {}
|
||||
|
||||
PlaneInformationFsinn::PlaneInformationFsinn(const QString &sender, const QString &receiver,
|
||||
const QString &airlineIcao, const QString &aircraftIcao,
|
||||
const QString &aircraftIcaoCombinedType,
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
PlaneInformationFsinn();
|
||||
PlaneInformationFsinn() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
Pong::Pong() : MessageBase() {}
|
||||
|
||||
Pong::Pong(const QString &sender, const QString &receiver, const QString ×tamp)
|
||||
: MessageBase(sender, receiver), m_timestamp(timestamp)
|
||||
{}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace swift::core::fsd
|
||||
QString m_timestamp; //!< timestamp
|
||||
|
||||
private:
|
||||
Pong();
|
||||
Pong() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -12,8 +12,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
Rehost::Rehost() : MessageBase() {}
|
||||
|
||||
Rehost::Rehost(const QString &sender, const QString &hostname) : MessageBase(sender, {}), m_hostname(hostname) {}
|
||||
|
||||
QStringList Rehost::toTokens() const { return { m_sender, m_hostname }; }
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
Rehost();
|
||||
Rehost() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
TextMessage::TextMessage() : MessageBase() {}
|
||||
|
||||
TextMessage::TextMessage(const QString &sender, const QString &receiver, const QString &message)
|
||||
: MessageBase(sender, receiver), m_message(message)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace swift::core::fsd
|
||||
QVector<int> m_frequencies; //!< frequencies in case of radio message.
|
||||
|
||||
private:
|
||||
TextMessage();
|
||||
TextMessage() = default;
|
||||
};
|
||||
} // namespace swift::core::fsd
|
||||
|
||||
|
||||
@@ -14,8 +14,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
VisualPilotDataPeriodic::VisualPilotDataPeriodic() : MessageBase() {}
|
||||
|
||||
VisualPilotDataPeriodic::VisualPilotDataPeriodic(const QString &sender, double latitude, double longitude,
|
||||
double altitudeTrue, double heightAgl, double pitch, double bank,
|
||||
double heading, double xVelocity, double yVelocity,
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
VisualPilotDataPeriodic();
|
||||
VisualPilotDataPeriodic() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -14,8 +14,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
VisualPilotDataStopped::VisualPilotDataStopped() : MessageBase() {}
|
||||
|
||||
VisualPilotDataStopped::VisualPilotDataStopped(const QString &sender, double latitude, double longitude,
|
||||
double altitudeTrue, double heightAgl, double pitch, double bank,
|
||||
double heading, double noseGearAngle)
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
VisualPilotDataStopped();
|
||||
VisualPilotDataStopped() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -13,8 +13,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
VisualPilotDataToggle::VisualPilotDataToggle() : MessageBase() {}
|
||||
|
||||
VisualPilotDataToggle::VisualPilotDataToggle(const QString &sender, const QString &client, bool active)
|
||||
: MessageBase(sender, {}), m_client(client), m_active(active)
|
||||
{}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
private:
|
||||
VisualPilotDataToggle();
|
||||
VisualPilotDataToggle() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -15,8 +15,6 @@ using namespace swift::misc::aviation;
|
||||
|
||||
namespace swift::core::fsd
|
||||
{
|
||||
VisualPilotDataUpdate::VisualPilotDataUpdate() : MessageBase() {}
|
||||
|
||||
VisualPilotDataUpdate::VisualPilotDataUpdate(const QString &sender, double latitude, double longitude,
|
||||
double altitudeTrue, double heightAgl, double pitch, double bank,
|
||||
double heading, double xVelocity, double yVelocity, double zVelocity,
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace swift::core::fsd
|
||||
//! @}
|
||||
|
||||
// private: // not private: used in CFSDClient::handleVisualPilotDataUpdate
|
||||
VisualPilotDataUpdate();
|
||||
VisualPilotDataUpdate() = default;
|
||||
};
|
||||
|
||||
//! Equal to operator
|
||||
|
||||
@@ -1232,7 +1232,7 @@ namespace swift::core
|
||||
}
|
||||
}
|
||||
|
||||
ISimulatorListener::ISimulatorListener(const CSimulatorPluginInfo &info) : QObject(), m_info(info)
|
||||
ISimulatorListener::ISimulatorListener(const CSimulatorPluginInfo &info) : m_info(info)
|
||||
{
|
||||
this->setObjectName("ISimulatorListener:" + info.toQString());
|
||||
|
||||
|
||||
@@ -39,8 +39,7 @@ namespace swift::gui::components
|
||||
return cats;
|
||||
}
|
||||
|
||||
CSimulatorComponent::CSimulatorComponent(QWidget *parent)
|
||||
: QTabWidget(parent), CEnableForDockWidgetInfoArea(), ui(new Ui::CSimulatorComponent)
|
||||
CSimulatorComponent::CSimulatorComponent(QWidget *parent) : QTabWidget(parent), ui(new Ui::CSimulatorComponent)
|
||||
{
|
||||
Q_ASSERT_X(sGui, Q_FUNC_INFO, "Need sGui");
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ using namespace swift::core::context;
|
||||
|
||||
namespace swift::gui::components
|
||||
{
|
||||
CUserComponent::CUserComponent(QWidget *parent)
|
||||
: QTabWidget(parent), CEnableForDockWidgetInfoArea(), ui(new Ui::CUserComponent)
|
||||
CUserComponent::CUserComponent(QWidget *parent) : QTabWidget(parent), ui(new Ui::CUserComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setCurrentIndex(0);
|
||||
|
||||
@@ -16,10 +16,7 @@ SWIFT_DEFINE_VALUEOBJECT_MIXINS(swift::misc::network, CUrlLog)
|
||||
|
||||
namespace swift::misc::network
|
||||
{
|
||||
CUrlLog::CUrlLog(const CUrl &url) : ITimestampBased(), m_id(uniqueId()), m_url(url)
|
||||
{
|
||||
ITimestampBased::setCurrentUtcTime();
|
||||
}
|
||||
CUrlLog::CUrlLog(const CUrl &url) : m_id(uniqueId()), m_url(url) { ITimestampBased::setCurrentUtcTime(); }
|
||||
|
||||
void CUrlLog::setResponseTimestampToNow()
|
||||
{
|
||||
|
||||
@@ -24,9 +24,7 @@ namespace swift::misc::simulation
|
||||
return cats;
|
||||
}
|
||||
|
||||
CRemoteAircraftProvider::CRemoteAircraftProvider(QObject *parent)
|
||||
: QObject(parent), IRemoteAircraftProvider(), CIdentifiable(this)
|
||||
{}
|
||||
CRemoteAircraftProvider::CRemoteAircraftProvider(QObject *parent) : QObject(parent), CIdentifiable(this) {}
|
||||
|
||||
CSimulatedAircraftList CRemoteAircraftProvider::getAircraftInRange() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user