summaryrefslogtreecommitdiff
path: root/qmake/include/qgarray.h
Side-by-side diff
Diffstat (limited to 'qmake/include/qgarray.h') (more/less context) (show whitespace changes)
-rw-r--r--qmake/include/qgarray.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/qmake/include/qgarray.h b/qmake/include/qgarray.h
index 12edea6..40720a6 100644
--- a/qmake/include/qgarray.h
+++ b/qmake/include/qgarray.h
@@ -49,11 +49,19 @@ friend class QBuffer;
public:
//### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE.
struct array_data : public QShared { // shared array
- array_data() { data=0; len=0; }
+ array_data():data(0),len(0)
+#ifdef QT_QGARRAY_SPEED_OPTIM
+ ,maxl(0)
+#endif
+ {}
char *data; // actual array data
uint len;
+#ifdef QT_QGARRAY_SPEED_OPTIM
+ uint maxl;
+#endif
};
QGArray();
+ enum Optimization { MemOptim, SpeedOptim };
protected:
QGArray( int, int ); // dummy; does not alloc
QGArray( int size ); // allocate 'size' bytes
@@ -70,6 +78,7 @@ protected:
uint size() const { return shd->len; }
bool isEqual( const QGArray &a ) const;
+ bool resize( uint newsize, Optimization optim );
bool resize( uint newsize );
bool fill( const char *d, int len, uint sz );