diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 36a637886c..cf89e1760f 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -401,7 +401,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError ) } else if( place->side == T_back ) { - int orientation = (place->rotation + 180.0) * 10.0; + int orientation = (int) ((place->rotation + 180.0) * 10.0); if( module->GetLayer() != COPPER_LAYER_N ) { // module is on component layer (front) diff --git a/polygon/math_for_graphics.cpp b/polygon/math_for_graphics.cpp index 6ed28c927f..8649c0c6b6 100644 --- a/polygon/math_for_graphics.cpp +++ b/polygon/math_for_graphics.cpp @@ -696,9 +696,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y if( InRange( y1, y1i, y1f ) && InRange( x1, x2i, x2f ) && InRange( y1, y2i, y2f ) ) { if( x ) - *x = x1; + *x = (int) x1; if( y ) - *y = y1; + *y = (int) y1; if( d ) *d = 0.0; return true; @@ -719,9 +719,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y if( InRange( x1, x1i, x1f ) && InRange( x1, x2i, x2f ) && InRange( y1, y2i, y2f ) ) { if( x ) - *x = x1; + *x = (int) x1; if( y ) - *y = y1; + *y = (int) y1; if( d ) *d = 0.0; return true; @@ -742,9 +742,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y if( InRange( x1, x1i, x1f ) && InRange( y1, y1i, y1f ) && InRange( y1, y2i, y2f ) ) { if( x ) - *x = x1; + *x = (int) x1; if( y ) - *y = y1; + *y = (int) y1; if( d ) *d = 0.0; return true; @@ -765,9 +765,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y if( InRange( x1, x1i, x1f ) && InRange( y1, y1i, y1f ) ) { if( x ) - *x = x1; + *x = (int) x1; if( y ) - *y = y1; + *y = (int) y1; if( d ) *d = 0.0; return true; @@ -791,9 +791,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y if( InRange( x1, x1i, x1f ) && InRange( y1, y1i, y1f ) ) { if( x ) - *x = x1; + *x = (int) x1; if( y ) - *y = y1; + *y = (int) y1; if( d ) *d = 0.0; return true; @@ -827,9 +827,9 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y yy = y2f; } if( x ) - *x = xx; + *x = (int) xx; if( y ) - *y = yy; + *y = (int) yy; if( d ) *d = dist; return false; @@ -1111,7 +1111,7 @@ void GetPadElements( int type, int x, int y, int wid, int len, int radius, int a theta += pi/4.0; double dx = x + radius*cos(theta); double dy = y + radius*sin(theta); - s[is] = my_seg(last_x, last_y, x, y); + s[is] = my_seg((int) last_x, (int) last_y, x, y); last_x = dx; last_y = dy; } @@ -1213,7 +1213,7 @@ int GetClearanceBetweenSegmentAndPad( int x1, int y1, int x2, int y2, int w, int dist = INT_MAX; for( int ic=0; icCenter.X + el2->xrad*cos(theta2); double y2 = el2->Center.Y + el2->yrad*sin(theta2); - double d = Distance( x, y, x2, y2 ); + double d = Distance( (int) x, (int) y, (int) x2, (int) y2 ); if( d < dmin ) { dmin = d; diff --git a/polygon/php_polygon.cpp b/polygon/php_polygon.cpp index ce1babe443..22e553a98a 100644 --- a/polygon/php_polygon.cpp +++ b/polygon/php_polygon.cpp @@ -186,7 +186,7 @@ polygon * polygon::copy_poly() vertex * v = getFirst(); do { - n->addv(v->X(),v->Y(),v->Xc(),v->Yc(),v->d()); + n->addv(v->X(),v->Y(),v->Xc(),v->Yc(), (int) v->d()); v = v->Next(); } while (v->id() != m_first->id()); @@ -377,8 +377,8 @@ BOOL polygon::ints( vertex * p1, vertex * p2, vertex * q1, vertex * q2, { BOOL found = FALSE; *n = 0; // No intersections found yet - int pt = p1->d(); - int qt = q1->d(); // Do we have Arcs or Lines? + int pt = (int) p1->d(); + int qt = (int) q1->d(); // Do we have Arcs or Lines? if (pt == 0 && qt == 0) // Is it line/Line ? { diff --git a/polygon/php_polygon_vertex.cpp b/polygon/php_polygon_vertex.cpp index a2c0399ada..20b0cdaf04 100644 --- a/polygon/php_polygon_vertex.cpp +++ b/polygon/php_polygon_vertex.cpp @@ -77,7 +77,7 @@ vertex::vertex( double x, double y, m_entry = entry; m_checked = checked; m_id = 0; - m_nSeg = new segment( xc, yc, d ); + m_nSeg = new segment( xc, yc, (int) d ); m_pSeg = NULL; }