Fix unsigned usage in signed contexts
This commit is contained in:
parent
331de68e86
commit
c6a43dbffa
1 changed files with 3 additions and 3 deletions
|
@ -168,7 +168,7 @@ void AHistoryGraph::DrawFrame ( const int iNewNumTicksX )
|
||||||
{
|
{
|
||||||
int iBottomExtraTickLen = 0;
|
int iBottomExtraTickLen = 0;
|
||||||
const int iCurX = gridFrameX + static_cast<int> ( dayXSpace * ( i + 1 ) );
|
const int iCurX = gridFrameX + static_cast<int> ( dayXSpace * ( i + 1 ) );
|
||||||
const QDate curXAxisDate = curDate.addDays ( i - iNumTicksX + 1 );
|
const QDate curXAxisDate = curDate.addDays ( 0 - static_cast<signed>( iNumTicksX ) + i + 1 );
|
||||||
|
|
||||||
// text (print only every "iXAxisTickStep" tick)
|
// text (print only every "iXAxisTickStep" tick)
|
||||||
if ( !( i % iXAxisTickStep ) )
|
if ( !( i % iXAxisTickStep ) )
|
||||||
|
@ -219,7 +219,7 @@ void AHistoryGraph::AddMarker ( const SHistoryData& curHistoryData )
|
||||||
curDate.daysTo ( curHistoryData.DateTime.date() );
|
curDate.daysTo ( curHistoryData.DateTime.date() );
|
||||||
|
|
||||||
// check range, if out of range, do not plot anything
|
// check range, if out of range, do not plot anything
|
||||||
if ( -iXAxisOffs > ( static_cast<int>(iNumTicksX) - 1 ) )
|
if ( -iXAxisOffs > ( static_cast<signed>( iNumTicksX ) - 1 ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ void AHistoryGraph::AddMarker ( const SHistoryData& curHistoryData )
|
||||||
static_cast<double> ( curHistoryData.DateTime.time().minute() ) / 60;
|
static_cast<double> ( curHistoryData.DateTime.time().minute() ) / 60;
|
||||||
|
|
||||||
// calculate the actual point in the graph (in pixels)
|
// calculate the actual point in the graph (in pixels)
|
||||||
int curPointX = gridFrameX + static_cast<int> ( dayXSpace * ( iNumTicksX + iXAxisOffs ) );
|
int curPointX = gridFrameX + static_cast<int> ( dayXSpace * ( static_cast<signed>( iNumTicksX ) + iXAxisOffs ) );
|
||||||
int curPointY = gridFrameY + static_cast<int> ( static_cast<double> (
|
int curPointY = gridFrameY + static_cast<int> ( static_cast<double> (
|
||||||
gridFrameHeight ) / ( iYAxisEnd - iYAxisStart ) * dYAxisOffs );
|
gridFrameHeight ) / ( iYAxisEnd - iYAxisStart ) * dYAxisOffs );
|
||||||
QString curPointColour = MarkerNewColor;
|
QString curPointColour = MarkerNewColor;
|
||||||
|
|
Loading…
Reference in a new issue