Commit b5cf8f52 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Fix cpp-check warnings and Windows build error

parent 72a7c8f1
......@@ -168,7 +168,7 @@ void Focus::checkCCD(int ccdNum)
return;
}
if (ccdNum >= 0 && ccdNum <= CCDs.count())
if (ccdNum >= 0 && ccdNum < CCDs.count())
{
currentCCD = CCDs.at(ccdNum);
......@@ -1877,8 +1877,9 @@ void Focus::autoFocusLinear()
if (!canAbsMove && !canRelMove && canTimerMove)
{
const bool kFixPosition = true;
if (kFixPosition && (linearRequestedPosition != currentPosition))
//const bool kFixPosition = true;
if (linearRequestedPosition != currentPosition)
//if (kFixPosition && (linearRequestedPosition != currentPosition))
{
qCDebug(KSTARS_EKOS_FOCUS) << "Linear: warning, changing position " << currentPosition << " to "
<< linearRequestedPosition;
......@@ -2117,7 +2118,7 @@ void Focus::autoFocusAbs()
{
// HFR increased, let's deal with it.
HFRInc++;
//HFRInc++;
HFRDec = 0;
// Reality Check: If it's first time, let's capture again and see if it changes.
......@@ -2360,7 +2361,7 @@ void Focus::autoFocusRel()
}
else
{
HFRInc++;
//HFRInc++;
lastHFR = currentHFR;
......@@ -3245,13 +3246,14 @@ void Focus::setMountStatus(ISD::Telescope::Status newState)
}
}
void Focus::mountCoords(__attribute__ ((unused)) const QString &ra,
__attribute__ ((unused)) const QString &dec,
__attribute__ ((unused)) const QString &az,
const QString &alt,
__attribute__ ((unused)) int pierSide,
__attribute__ ((unused)) const QString &ha)
void Focus::mountCoords(const QString &ra, const QString &dec, const QString &az, const QString &alt,
int pierSide, const QString &ha)
{
Q_UNUSED(ra);
Q_UNUSED(dec);
Q_UNUSED(az);
Q_UNUSED(pierSide);
Q_UNUSED(ha);
mountAlt = dms(alt, true).Degrees();
}
......@@ -3269,7 +3271,6 @@ void Focus::removeDevice(ISD::GDInterface *deviceRemoved)
checkFocuser();
resetButtons();
});
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment