mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Fixed wrong CLogMessage constructor being used
nullptr was being implicitly converted to a null C-style string via the initializer_list constructor of CLogCategoryList. refs #790
This commit is contained in:
committed by
Klaus Basan
parent
b5dfd15d66
commit
e25785d09b
@@ -50,6 +50,9 @@ namespace BlackMisc
|
||||
//! Initializer list constructor.
|
||||
CLogCategoryList(std::initializer_list<CLogCategory> il) : CSequence<CLogCategory>(il) {}
|
||||
|
||||
//! Prevent accidental use of the initializer list constructor.
|
||||
CLogCategoryList(std::nullptr_t) = delete;
|
||||
|
||||
//! Copy assignment.
|
||||
CLogCategoryList &operator =(const CLogCategoryList &) = default;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BlackSimPlugin
|
||||
FS_PBH pbhstrct;
|
||||
pbhstrct.pbh = positionVelocity.pbh;
|
||||
int pitch = std::floor(pbhstrct.pitch / CFs9Sdk::pitchMultiplier());
|
||||
if (pitch < -90 || pitch > 89) { CLogMessage(nullptr).warning("FS9: Pitch value out of limits: %1") << pitch; }
|
||||
if (pitch < -90 || pitch > 89) { CLogMessage().warning("FS9: Pitch value out of limits: %1") << pitch; }
|
||||
int bank = std::floor(pbhstrct.bank / CFs9Sdk::bankMultiplier());
|
||||
|
||||
// MSFS has inverted pitch and bank angles
|
||||
|
||||
Reference in New Issue
Block a user