Initialise CMultiColorLED::eColorFlag earlier.

This avoids an uninitialised read when Reset() is called.
This commit is contained in:
Adam Sampson 2020-06-21 13:55:08 +01:00
parent 6cac92f1b0
commit b7ef20b222

View file

@ -37,12 +37,12 @@ CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f )
BitmCubeYellow ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDYellowSmall.png" ) ), BitmCubeYellow ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDYellowSmall.png" ) ),
BitmCubeRed ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDRedSmall.png" ) ) BitmCubeRed ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDRedSmall.png" ) )
{ {
// init color flags
Reset();
// set init bitmap // set init bitmap
setPixmap ( BitmCubeGrey ); setPixmap ( BitmCubeGrey );
eColorFlag = RL_GREY; eColorFlag = RL_GREY;
// init color flags
Reset();
} }
void CMultiColorLED::changeEvent ( QEvent* curEvent ) void CMultiColorLED::changeEvent ( QEvent* curEvent )