mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-13 12:42:20 +00:00
Fix qwt 'comparison is always false'/true warnings
This commit is contained in:
@@ -18,7 +18,7 @@ static inline double qwtMsecsForType( QwtDate::IntervalType type )
|
|||||||
365.0 * 24.0 * 3600.0 * 1000.0,
|
365.0 * 24.0 * 3600.0 * 1000.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( type < 0 || type >= static_cast<int>( sizeof( msecs ) / sizeof( msecs[0] ) ) )
|
if ( static_cast<int>(type) < 0 || static_cast<int>(type) >= static_cast<int>( sizeof( msecs ) / sizeof( msecs[0] ) ) )
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
|
||||||
return msecs[ type ];
|
return msecs[ type ];
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ QPen QwtPlotTradingCurve::symbolPen() const
|
|||||||
void QwtPlotTradingCurve::setSymbolBrush(
|
void QwtPlotTradingCurve::setSymbolBrush(
|
||||||
Direction direction, const QBrush &brush )
|
Direction direction, const QBrush &brush )
|
||||||
{
|
{
|
||||||
if ( direction < 0 || direction >= 2 )
|
if ( static_cast<int>(direction) < 0 || static_cast<int>(direction) >= 2 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( brush != d_data->symbolBrush[ direction ] )
|
if ( brush != d_data->symbolBrush[ direction ] )
|
||||||
@@ -256,7 +256,7 @@ void QwtPlotTradingCurve::setSymbolBrush(
|
|||||||
*/
|
*/
|
||||||
QBrush QwtPlotTradingCurve::symbolBrush( Direction direction ) const
|
QBrush QwtPlotTradingCurve::symbolBrush( Direction direction ) const
|
||||||
{
|
{
|
||||||
if ( direction < 0 || direction >= 2 )
|
if ( static_cast<int>(direction) < 0 || static_cast<int>(direction) >= 2 )
|
||||||
return QBrush();
|
return QBrush();
|
||||||
|
|
||||||
return d_data->symbolBrush[ direction ];
|
return d_data->symbolBrush[ direction ];
|
||||||
|
|||||||
Reference in New Issue
Block a user