mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
d96a9a9fa2
commit
d2d44085ba
@@ -222,7 +222,6 @@ namespace BlackCore
|
||||
void CNetworkVatlib::sendInterimPositions()
|
||||
{
|
||||
if (!m_net) { return; }
|
||||
|
||||
if (isConnected())
|
||||
{
|
||||
CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace BlackCore
|
||||
const QString dts = updateParts.at(1).trimmed();
|
||||
updateTimestampFromFile = QDateTime::fromString(dts, "yyyyMMddHHmmss");
|
||||
updateTimestampFromFile.setOffsetFromUtc(0);
|
||||
bool alreadyRead = (updateTimestampFromFile == this->getUpdateTimestamp());
|
||||
const bool alreadyRead = (updateTimestampFromFile == this->getUpdateTimestamp());
|
||||
if (alreadyRead)
|
||||
{
|
||||
CLogMessage(this).info("VATSIM file has same timestamp, skipped");
|
||||
@@ -374,8 +374,8 @@ namespace BlackCore
|
||||
const QStringList fsdServerParts = currentLine.split(':');
|
||||
if (fsdServerParts.size() < 5) break;
|
||||
if (!fsdServerParts.at(4).trimmed().contains('1')) break; // allowed?
|
||||
QString description(fsdServerParts.at(2)); // part(3) could be added
|
||||
BlackMisc::Network::CServer fsdServer(fsdServerParts.at(0), description, fsdServerParts.at(1), 6809, CUser("id", "real name", "email", "password"));
|
||||
const QString description(fsdServerParts.at(2)); // part(3) could be added
|
||||
const BlackMisc::Network::CServer fsdServer(fsdServerParts.at(0), description, fsdServerParts.at(1), 6809, CUser("id", "real name", "email", "password"));
|
||||
fsdServers.push_back(fsdServer);
|
||||
}
|
||||
break;
|
||||
@@ -385,7 +385,7 @@ namespace BlackCore
|
||||
const QStringList voiceServerParts = currentLine.split(':');
|
||||
if (voiceServerParts.size() < 3) break;
|
||||
if (!voiceServerParts.at(3).trimmed().contains('1')) break; // allowed?
|
||||
BlackMisc::Network::CServer voiceServer(voiceServerParts.at(1), voiceServerParts.at(2), voiceServerParts.at(0), -1, CUser());
|
||||
const BlackMisc::Network::CServer voiceServer(voiceServerParts.at(1), voiceServerParts.at(2), voiceServerParts.at(0), -1, CUser());
|
||||
voiceServers.push_back(voiceServer);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -131,9 +131,6 @@ namespace BlackCore
|
||||
Vat_ConnectProducerConsumerToConsumer(audioMixerVatlib->getVatAudioMixer(), outputPort, nullptr, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process voice handling
|
||||
*/
|
||||
void CVoiceVatlib::timerEvent(QTimerEvent *)
|
||||
{
|
||||
Q_ASSERT_X(m_audioService, "CVoiceVatlib", "VatAudioService invalid!");
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace BlackCore
|
||||
class IAudioInputDevice;
|
||||
class IAudioOutputDevice;
|
||||
class IVoiceChannel;
|
||||
|
||||
namespace Vatsim
|
||||
{
|
||||
//! Vatlib implementation of the IVoice interface.
|
||||
@@ -90,14 +91,12 @@ namespace BlackCore
|
||||
//! \copydoc IVoice::disconnectVoice()
|
||||
void disconnectVoice(IAudioMixer *mixer, IAudioMixer::OutputPort outputPort) override;
|
||||
|
||||
protected: // QObject overrides
|
||||
|
||||
protected:
|
||||
//! Process voice lib
|
||||
virtual void timerEvent(QTimerEvent *) override;
|
||||
|
||||
private:
|
||||
|
||||
// this struct calls "myCustomDeallocator" to delete the pointer
|
||||
//! this struct calls Vat_DestroyAudioService to delete the pointer
|
||||
struct VatAudioServiceDeleter
|
||||
{
|
||||
static inline void cleanup(VatAudioService_tag *obj)
|
||||
@@ -106,6 +105,7 @@ namespace BlackCore
|
||||
}
|
||||
};
|
||||
|
||||
//! this struct calls Vat_DestroyUDPAudioPort to delete the pointer
|
||||
struct VatUDPAudioPortDeleter
|
||||
{
|
||||
static inline void cleanup(VatUDPAudioPort_tag *obj)
|
||||
@@ -118,7 +118,6 @@ namespace BlackCore
|
||||
|
||||
QScopedPointer<VatAudioService_tag, VatAudioServiceDeleter> m_audioService;
|
||||
QScopedPointer<VatUDPAudioPort_tag, VatUDPAudioPortDeleter> m_udpPort;
|
||||
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user