diff options
Diffstat (limited to 'src/gui/painting/qdatabuffer_p.h')
-rw-r--r-- | src/gui/painting/qdatabuffer_p.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h index e2855c80d0..0eea4c641f 100644 --- a/src/gui/painting/qdatabuffer_p.h +++ b/src/gui/painting/qdatabuffer_p.h @@ -55,6 +55,8 @@ #include "QtCore/qbytearray.h" +#include <stdlib.h> + QT_BEGIN_NAMESPACE template <typename Type> class QDataBuffer @@ -64,7 +66,7 @@ public: { capacity = res; if (res) - buffer = (Type*) qMalloc(capacity * sizeof(Type)); + buffer = (Type*) malloc(capacity * sizeof(Type)); else buffer = 0; siz = 0; @@ -73,7 +75,7 @@ public: ~QDataBuffer() { if (buffer) - qFree(buffer); + free(buffer); } inline void reset() { siz = 0; } @@ -112,16 +114,16 @@ public: capacity = 1; while (capacity < size) capacity *= 2; - buffer = (Type*) qRealloc(buffer, capacity * sizeof(Type)); + buffer = (Type*) realloc(buffer, capacity * sizeof(Type)); } } inline void shrink(int size) { capacity = size; if (size) - buffer = (Type*) qRealloc(buffer, capacity * sizeof(Type)); + buffer = (Type*) realloc(buffer, capacity * sizeof(Type)); else { - qFree(buffer); + free(buffer); buffer = 0; } } |