diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-09-30 13:51:29 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2012-09-30 13:51:29 (GMT) |
commit | 9c9313827b29876de43ad5305fd7ac162013359c (patch) | |
tree | d18c06222e0f84d6077b586e5633053a8bc09da8 /qtools/qarray.h | |
parent | 489cefdf7a2ce294a15cb12b866dce13f5664f12 (diff) | |
download | Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.zip Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.tar.gz Doxygen-9c9313827b29876de43ad5305fd7ac162013359c.tar.bz2 |
Release-1.8.2-20120930
Diffstat (limited to 'qtools/qarray.h')
-rw-r--r-- | qtools/qarray.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qtools/qarray.h b/qtools/qarray.h index 90dcbb7..3d67fe9 100644 --- a/qtools/qarray.h +++ b/qtools/qarray.h @@ -55,19 +55,19 @@ protected: public: QArray() {} - QArray( int size ) : QGArray(size*sizeof(type)) {} + QArray( int size ) : QGArray(size*(int)sizeof(type)) {} QArray( const QArray<type> &a ) : QGArray(a) {} ~QArray() {} QArray<type> &operator=(const QArray<type> &a) { return (QArray<type>&)QGArray::assign(a); } type *data() const { return (type *)QGArray::data(); } uint nrefs() const { return QGArray::nrefs(); } - uint size() const { return QGArray::size()/sizeof(type); } + uint size() const { return QGArray::size()/(int)sizeof(type); } uint count() const { return size(); } bool isEmpty() const { return QGArray::size() == 0; } bool isNull() const { return QGArray::data() == 0; } - bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); } - bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); } + bool resize( uint size ) { return QGArray::resize(size*(int)sizeof(type)); } + bool truncate( uint pos ) { return QGArray::resize(pos*(int)sizeof(type)); } bool fill( const type &d, int size = -1 ) { return QGArray::fill((char*)&d,size,sizeof(type) ); } void detach() { QGArray::detach(); } @@ -94,9 +94,9 @@ public: int bsearch( const type &d ) const { return QGArray::bsearch((const char*)&d,sizeof(type)); } type& operator[]( int i ) const - { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); } type& at( uint i ) const - { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); } operator const type*() const { return (const type *)QGArray::data(); } bool operator==( const QArray<type> &a ) const { return isEqual(a); } bool operator!=( const QArray<type> &a ) const { return !isEqual(a); } |