mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
refactor: Fix clang-tidy modernize-use-auto
This commit is contained in:
@@ -33,12 +33,12 @@ int main(int argc, char *argv[])
|
||||
swift::core::registerMetadata();
|
||||
swift::core::CApplication a("sampleafvclient", CApplicationInfo::Sample);
|
||||
|
||||
CAfvMapReader *afvMapReader = new CAfvMapReader(&a);
|
||||
auto *afvMapReader = new CAfvMapReader(&a);
|
||||
afvMapReader->updateFromMap();
|
||||
|
||||
CAfvClient *voiceClient = new CAfvClient("https://voice1.vatsim.net", &qa);
|
||||
auto *voiceClient = new CAfvClient("https://voice1.vatsim.net", &qa);
|
||||
voiceClient->start(QThread::TimeCriticalPriority); // background thread
|
||||
CAfvClientBridge *voiceClientBridge = new CAfvClientBridge(voiceClient, &qa);
|
||||
auto *voiceClientBridge = new CAfvClientBridge(voiceClient, &qa);
|
||||
|
||||
QObject::connect(&qa, &QCoreApplication::aboutToQuit, [voiceClient]() { voiceClient->quitAndWait(); });
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ namespace swift::sample
|
||||
out << f1 << " " << f1.valueRoundedWithUnit(CFrequencyUnit::MHz()) << " "
|
||||
<< f1.valueRoundedWithUnit(CFrequencyUnit::GHz(), 3);
|
||||
|
||||
CSpeed s1 = CSpeed(100, CSpeedUnit::km_h());
|
||||
CSpeed s2 = CSpeed(1000, CSpeedUnit::ft_min());
|
||||
CSpeed s3 = CSpeed(s2);
|
||||
CSpeed s1(100, CSpeedUnit::km_h());
|
||||
CSpeed s2(1000, CSpeedUnit::ft_min());
|
||||
CSpeed s3(s2);
|
||||
s3.switchUnit(CSpeedUnit::m_s());
|
||||
out << s1 << " " << s1.valueRoundedWithUnit(CSpeedUnit::defaultUnit()) << " "
|
||||
<< s1.valueRoundedWithUnit(CSpeedUnit::NM_h());
|
||||
|
||||
Reference in New Issue
Block a user