Skip to content

Commit

Permalink
Switches the atomic type to something that works better with older
Browse files Browse the repository at this point in the history
G++ releases.
  • Loading branch information
balazsracz committed Jul 16, 2020
1 parent d6399d8 commit 771e517
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dcc/DccOutput.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ public:
/// \link DccOutput::DisableReason } These bits are all set by the
/// application. The DCC Driver will only read this variable, and enable
/// the output if all bits are zero.
static std::atomic_uint8_t outputDisableReasons_;
static std::atomic_uint_least8_t outputDisableReasons_;

/// 0 if we should not produce a railcom cutout; 1 for short cutout; 2 for
/// regular cutout. Set by the application and read by the DCC driver.
static std::atomic_uint8_t isRailcomCutoutEnabled_;
static std::atomic_uint_least8_t isRailcomCutoutEnabled_;

/// 1 if we are in a railcom cutout currently. Set and cleared by the
/// driver before calling the start/stop railcom cutout functions.
Expand Down Expand Up @@ -233,10 +233,10 @@ private:
};

template <int N>
std::atomic_uint8_t DccOutputHw<N>::outputDisableReasons_ {
std::atomic_uint_least8_t DccOutputHw<N>::outputDisableReasons_ {
(uint8_t)DccOutput::DisableReason::INITIALIZATION_PENDING};
template <int N>
std::atomic_uint8_t DccOutputHw<N>::isRailcomCutoutEnabled_ {
std::atomic_uint_least8_t DccOutputHw<N>::isRailcomCutoutEnabled_ {
(uint8_t)DccOutput::RailcomCutout::LONG_CUTOUT};
template <int N> uint8_t DccOutputHw<N>::isRailcomCutoutActive_ {0};

Expand Down

0 comments on commit 771e517

Please sign in to comment.