From 41a83e1ff19ad1396e6001e6b0ac003c701ba55a Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 3 Aug 2009 15:12:46 +0200 Subject: Squashed commit of the topic/exceptions branch. Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;) --- src/gui/painting/qtessellator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/painting/qtessellator.cpp') 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; -- cgit v1.2.3