Skip to content

Commit 269bf02

Browse files
committed
remove useless cast
(int) x + y => static_cast<int>(x) + y precedence is higher for casting see https://en.cppreference.com/w/cpp/language/operator_precedence
1 parent fde813c commit 269bf02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/qgsstatusbarmagnifierwidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ QgsStatusBarMagnifierWidget::QgsStatusBarMagnifierWidget( QWidget *parent )
6868

6969
void QgsStatusBarMagnifierWidget::setDefaultFactor( double factor )
7070
{
71-
mSpinBox->setClearValue( ( int )100 * factor );
71+
mSpinBox->setClearValue( 100 * factor );
7272
}
7373

7474
void QgsStatusBarMagnifierWidget::setFont( const QFont &myFont )

src/gui/qgsadvanceddigitizingcanvasitem.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
142142
painter->drawArc( prevPointPix.x() - 20,
143143
prevPointPix.y() - 20,
144144
40, 40,
145-
( int )16 * -a0 * 180 / M_PI,
146-
( int )16 * ( a0 - a ) * 180 / M_PI );
145+
16 * -a0 * 180 / M_PI,
146+
16 * ( a0 - a ) * 180 / M_PI );
147147
painter->drawLine( prevPointPix.x(),
148148
prevPointPix.y(),
149149
prevPointPix.x() + 60 * std::cos( a0 ),

0 commit comments

Comments
 (0)