summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtessellator.cpp
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-03 15:12:46 +0200
committerHarald Fernengel <harald@trolltech.com>2009-08-03 15:12:46 +0200
commit41a83e1ff19ad1396e6001e6b0ac003c701ba55a (patch)
tree609e40eda10418bbf925002c36552074796b96b6 /src/gui/painting/qtessellator.cpp
parentd1f3b9df2bc5c57d414da73a7d4f9ed7b25df3db (diff)
Squashed commit of the topic/exceptions branch.
Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
Diffstat (limited to 'src/gui/painting/qtessellator.cpp')
-rw-r--r--src/gui/painting/qtessellator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/painting/qtessellator.cpp b/src/gui/painting/qtessellator.cpp
index 711f99701c..6c16772f71 100644
--- a/src/gui/painting/qtessellator.cpp
+++ b/src/gui/painting/qtessellator.cpp
@@ -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;
}
}
@@ -739,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;