From fc8b54c1424006f39f116682374fb661a0ccaf3f Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Thu, 22 Oct 2009 20:06:05 +0200 Subject: [PATCH] Code cleanup. --- Eigen/QtAlignedMalloc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Eigen/QtAlignedMalloc b/Eigen/QtAlignedMalloc index b10489dd5..4710bcc3c 100644 --- a/Eigen/QtAlignedMalloc +++ b/Eigen/QtAlignedMalloc @@ -1,6 +1,8 @@ #ifndef EIGEN_QTMALLOC_MODULE_H #define EIGEN_QTMALLOC_MODULE_H +#if (!EIGEN_MALLOC_ALREADY_ALIGNED) + #ifdef QVECTOR_H #error You must include before . #endif @@ -16,9 +18,6 @@ #include "Core" #include -#include - -#if (!EIGEN_MALLOC_ALREADY_ALIGNED) inline void *qMalloc(size_t size) { @@ -38,16 +37,6 @@ inline void *qRealloc(void *ptr, size_t size) return newPtr; } -// needed to copy that too because it is implemented in the qt binary library, hence -// wouldn't otherwise honor our qMalloc. -QVectorData *QVectorData::malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init) -{ - QVectorData* p = (QVectorData *)qMalloc(sizeofTypedData + (size - 1) * sizeofT); - Q_CHECK_PTR(p); - ::memcpy(p, init, sizeofTypedData + (qMin(size, init->alloc) - 1) * sizeofT); - return p; -} - #endif #ifdef Q_DECL_IMPORT_ORIG