GCC warnings.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-21 12:56:31 +02:00
parent f62b78bd9b
commit bd6cf95340
4 changed files with 665 additions and 652 deletions

File diff suppressed because it is too large Load diff

View file

@ -48,21 +48,21 @@ typedef float real;
#endif
typedef struct {
real x, y;
real x, y;
} del_point2d_t;
typedef struct {
/** input points count */
unsigned int num_points;
/** input points count */
unsigned int num_points;
/** the input points */
del_point2d_t* points;
/** the input points */
del_point2d_t* points;
/** number of returned faces */
unsigned int num_faces;
/** number of returned faces */
unsigned int num_faces;
/** the triangles given as a sequence: num verts, verts indices, num verts, verts indices first face is the external face */
unsigned int* faces;
/** the triangles given as a sequence: num verts, verts indices, num verts, verts indices first face is the external face */
unsigned int* faces;
} delaunay2d_t;
typedef int (*incircle_predicate_t)(del_point2d_t* p0, del_point2d_t* p1, del_point2d_t* p2, del_point2d_t* p3);
@ -78,7 +78,7 @@ typedef int (*incircle_predicate_t)(del_point2d_t* p0, del_point2d_t* p1, del_p
* @pred: incircle predicate
* @return: the number of created faces
*/
delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points, incircle_predicate_t pred);
delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points);
/*
* release a delaunay2d object

View file

@ -142,12 +142,12 @@ void VObjEngine::drawPath(const QPainterPath &path)
}
int offset = 0;
delaunay2d_t *res = delaunay2d_from(points, num_points, NULL);//Calculate faces
delaunay2d_t *res = delaunay2d_from(points, num_points);//Calculate faces
QPointF pf[MAX_POINTS];
bool skipFace=false;//Need skip first face
for(int i = 0; i < res->num_faces; i++ )
for(unsigned int i = 0; i < res->num_faces; i++ )
{
if (offset == 0)
{
@ -200,6 +200,11 @@ void VObjEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawM
*stream << endl;
}
void VObjEngine::drawPolygon(const QPoint *points, int pointCount, QPaintEngine::PolygonDrawMode mode)
{
QPaintEngine::drawPolygon(points, pointCount, mode);
}
//---------------------------------------------------------------------------------------------------------------------
QPaintEngine::Type VObjEngine::type() const
{
@ -220,6 +225,12 @@ void VObjEngine::drawPoints(const QPointF *points, int pointCount)
}
}
//---------------------------------------------------------------------------------------------------------------------
void VObjEngine::drawPoints(const QPoint *points, int pointCount)
{
QPaintEngine::drawPoints(points, pointCount);
}
//---------------------------------------------------------------------------------------------------------------------
void VObjEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
{

View file

@ -48,8 +48,10 @@ public:
virtual void drawPath(const QPainterPath &path);
virtual Type type() const;
virtual void drawPoints(const QPointF *points, int pointCount);
virtual void drawPoints(const QPoint *points, int pointCount);
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr);
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode);
virtual void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode);
QSize getSize() const;
void setSize(const QSize &value);