summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtessellator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qtessellator.cpp')
-rw-r--r--src/gui/painting/qtessellator.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/painting/qtessellator.cpp b/src/gui/painting/qtessellator.cpp
index 51f8cd9..af66e70 100644
--- a/src/gui/painting/qtessellator.cpp
+++ b/src/gui/painting/qtessellator.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
#ifdef DEBUG
#define QDEBUG qDebug
#else
-#define QDEBUG if (1); else qDebug
+#define QDEBUG if (1){} else qDebug
#endif
static const bool emit_clever = true;
@@ -406,9 +406,9 @@ void QTessellatorPrivate::Scanline::init(int maxActiveEdges)
if (!edges || maxActiveEdges > default_alloc) {
max_edges = maxActiveEdges;
int s = qMax(maxActiveEdges + 1, default_alloc + 1);
- edges = (Edge **)realloc(edges, s*sizeof(Edge *));
- edge_table = (Edge *)realloc(edge_table, s*sizeof(Edge));
- old = (Edge **)realloc(old, s*sizeof(Edge *));
+ edges = q_check_ptr((Edge **)realloc(edges, s*sizeof(Edge *)));
+ edge_table = q_check_ptr((Edge *)realloc(edge_table, s*sizeof(Edge)));
+ old = q_check_ptr((Edge **)realloc(old, s*sizeof(Edge *)));
}
size = 0;
old_size = 0;
@@ -566,8 +566,8 @@ void QTessellatorPrivate::Vertices::init(int maxVertices)
{
if (!storage || maxVertices > allocated) {
int size = qMax((int)default_alloc, maxVertices);
- storage = (Vertex *)realloc(storage, size*sizeof(Vertex));
- sorted = (Vertex **)realloc(sorted, size*sizeof(Vertex *));
+ storage = q_check_ptr((Vertex *)realloc(storage, size*sizeof(Vertex)));
+ sorted = q_check_ptr((Vertex **)realloc(sorted, size*sizeof(Vertex *)));
allocated = maxVertices;
}
}
@@ -703,7 +703,6 @@ struct QCoincidingEdge {
}
};
-
static void cancelEdges(QCoincidingEdge &e1, QCoincidingEdge &e2)
{
if (e1.before) {
@@ -740,7 +739,7 @@ void QTessellatorPrivate::cancelCoincidingEdges()
if (testListSize > tlSize - 2) {
tlSize = qMax(tlSize*2, 16);
- tl = (QCoincidingEdge *)realloc(tl, tlSize*sizeof(QCoincidingEdge));
+ tl = q_check_ptr((QCoincidingEdge *)realloc(tl, tlSize*sizeof(QCoincidingEdge)));
}
if (n->flags & (LineBeforeStarts|LineBeforeHorizontal)) {
tl[testListSize].start = n;