mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +08:00
Ref T189, DWORD is unsigned
This commit is contained in:
@@ -1584,9 +1584,9 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
if (!m_traceSendId) { return; }
|
if (!m_traceSendId) { return; }
|
||||||
if (MaxSendIdTraces < 1) { return; }
|
if (MaxSendIdTraces < 1) { return; }
|
||||||
DWORD dwLastId = -1;
|
DWORD dwLastId = 0;
|
||||||
const HRESULT hr = SimConnect_GetLastSentPacketID(m_hSimConnect, &dwLastId);
|
const HRESULT hr = SimConnect_GetLastSentPacketID(m_hSimConnect, &dwLastId);
|
||||||
if (hr != S_OK || dwLastId < 0) { return; }
|
if (hr != S_OK) { return; }
|
||||||
if (m_sendIdTraces.size() > MaxSendIdTraces) { m_sendIdTraces.removeFirst(); }
|
if (m_sendIdTraces.size() > MaxSendIdTraces) { m_sendIdTraces.removeFirst(); }
|
||||||
const TraceFsxSendId trace(dwLastId, simObjectId,
|
const TraceFsxSendId trace(dwLastId, simObjectId,
|
||||||
details.isEmpty() ? function : details + ", " + function);
|
details.isEmpty() ? function : details + ", " + function);
|
||||||
|
|||||||
@@ -88,11 +88,15 @@ namespace BlackSimPlugin
|
|||||||
//! Ctor
|
//! Ctor
|
||||||
TraceFsxSendId(DWORD sendId, DWORD simObjectId, const QString &comment) :
|
TraceFsxSendId(DWORD sendId, DWORD simObjectId, const QString &comment) :
|
||||||
sendId(sendId), simObjectId(simObjectId), comment(comment)
|
sendId(sendId), simObjectId(simObjectId), comment(comment)
|
||||||
{ }
|
{
|
||||||
|
Q_ASSERT_X(sendId >= 0, Q_FUNC_INFO, "DWORD is unsigned");
|
||||||
|
Q_ASSERT_X(simObjectId >= 0, Q_FUNC_INFO, "DWORD is unsigned");
|
||||||
|
}
|
||||||
|
|
||||||
DWORD sendId = -1; //!< the send id
|
// DWORD is unsigned
|
||||||
DWORD simObjectId = -1; //!< corresponding CSimConnectObject
|
DWORD sendId = 0; //!< the send id
|
||||||
QString comment; //!< where sent
|
DWORD simObjectId = 0; //!< corresponding CSimConnectObject
|
||||||
|
QString comment; //!< where sent
|
||||||
};
|
};
|
||||||
|
|
||||||
//! FSX Simulator Implementation
|
//! FSX Simulator Implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user