Skip to content

Commit

Permalink
Replace designated initializer to work around compatibility issues wi…
Browse files Browse the repository at this point in the history
…th MSVC
  • Loading branch information
leecbaker committed Mar 14, 2021
1 parent ae8efeb commit 0323e52
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/lb_xplane/logging.cpp
Expand Up @@ -8,12 +8,11 @@ thread_local XPLogger xplog_debug(xplog_debug_aggregator);


XPLogAggregator::XPLogAggregator() {
XPLMCreateFlightLoop_t callback_info{
.structSize = sizeof(XPLMCreateFlightLoop_t),
.phase = xplm_FlightLoop_Phase_BeforeFlightModel,
.callbackFunc = &XPLogAggregator::logging_callback,
.refcon = this,
};
XPLMCreateFlightLoop_t callback_info;
callback_info.structSize = sizeof(XPLMCreateFlightLoop_t);
callback_info.phase = xplm_FlightLoop_Phase_BeforeFlightModel;
callback_info.callbackFunc = &XPLogAggregator::logging_callback;
callback_info.refcon = this;

callback_id = XPLMCreateFlightLoop(&callback_info);

Expand Down

0 comments on commit 0323e52

Please sign in to comment.