mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +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,
|
||||
};
|
||||
|
||||
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 msecs[ type ];
|
||||
|
||||
@@ -235,7 +235,7 @@ QPen QwtPlotTradingCurve::symbolPen() const
|
||||
void QwtPlotTradingCurve::setSymbolBrush(
|
||||
Direction direction, const QBrush &brush )
|
||||
{
|
||||
if ( direction < 0 || direction >= 2 )
|
||||
if ( static_cast<int>(direction) < 0 || static_cast<int>(direction) >= 2 )
|
||||
return;
|
||||
|
||||
if ( brush != d_data->symbolBrush[ direction ] )
|
||||
@@ -256,7 +256,7 @@ void QwtPlotTradingCurve::setSymbolBrush(
|
||||
*/
|
||||
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 d_data->symbolBrush[ direction ];
|
||||
|
||||
Reference in New Issue
Block a user