summaryrefslogtreecommitdiffstats
path: root/qtools/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtools/qstring.cpp')
-rw-r--r--qtools/qstring.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index 889e936..11187f6 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -13535,7 +13535,7 @@ QString &QString::insert( uint index, const QChar* s, uint len )
uint olen = length();
int nlen = olen + len;
- int df = s - d->unicode; // ### pointer subtraction, cast down to int
+ int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
if ( df >= 0 && (uint)df < d->maxl ) {
// Part of me - take a copy.
QChar *tmp = QT_ALLOC_QCHAR_VEC( len );
@@ -13679,7 +13679,7 @@ QString &QString::replace( uint index, uint len, const QChar* s, uint slen )
real_detach();
memcpy( d->unicode+index, s, len*sizeof(QChar) );
} else {
- int df = s - d->unicode; // ### pointer subtraction, cast down to int
+ int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int
if ( df >= 0 && (uint)df < d->maxl ) {
// Part of me - take a copy.
QChar *tmp = QT_ALLOC_QCHAR_VEC( slen );
@@ -15017,7 +15017,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str )
if ( ub || s.version() < 3 ) {
if ( QChar::networkOrdered() ==
(s.byteOrder()==QDataStream::BigEndian) ) {
- s.writeBytes( ub, sizeof(QChar)*str.length() );
+ s.writeBytes( ub, (int)sizeof(QChar)*str.length() );
} else {
static const uint auto_size = 1024;
char t[auto_size];
@@ -15034,7 +15034,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str )
*c++ = ub[0];
ub+=sizeof(QChar);
}
- s.writeBytes( b, sizeof(QChar)*str.length() );
+ s.writeBytes( b, (int)sizeof(QChar)*str.length() );
if ( str.length()*sizeof(QChar) > auto_size )
delete [] b;
}