Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Feb 12, 2023
1 parent 7d95dc8 commit b8c7f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/leddevice/LedDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ void LedDevice::identifyLed(const QJsonObject& params)
{
_blinkIndex = params["blinkIndex"].toInt(-1);

if (_blinkIndex < 0 || _blinkIndex >= _lastLedValues.size())
if (_blinkIndex < 0 || _blinkIndex >= (int)_lastLedValues.size())
{
_blinkIndex = -1;
}
Expand All @@ -563,7 +563,7 @@ void LedDevice::identifyLed(const QJsonObject& params)
ColorRgb color = (i % 3 == 0) ? ColorRgb::RED : (i % 3 == 1) ? ColorRgb::GREEN : ColorRgb::BLUE;

QTimer::singleShot(800 * i, this, [this, color, blinkOrg]() {
if (_blinkIndex == blinkOrg && _blinkIndex >= 0 && _blinkIndex < _lastLedValues.size())
if (_blinkIndex == blinkOrg && _blinkIndex >= 0 && _blinkIndex < (int)_lastLedValues.size())
{
_lastLedValues[_blinkIndex] = color;
rewriteLEDs();
Expand Down

0 comments on commit b8c7f04

Please sign in to comment.