Fix MSVC 2013/64bit warnings about conversion from 'size_t' to 'int'.
tools\qstring.cpp(243) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(287) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(292) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(305) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data io\qdebug.cpp(312) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data Change-Id: I20b92b0783f4859e9da83364b4ec86dd8bbd1c4c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
parent
916af48cff
commit
8fbde82686
@ -285,12 +285,12 @@ void QDebug::putString(const QChar *begin, size_t length)
|
||||
if (stream->testFlag(Stream::NoQuotes)) {
|
||||
// no quotes, write the string directly too (no pretty-printing)
|
||||
// this respects the QTextStream state, though
|
||||
stream->ts.d_ptr->putString(begin, length);
|
||||
stream->ts.d_ptr->putString(begin, int(length));
|
||||
} else {
|
||||
// we'll reset the QTextStream formatting mechanisms, so save the state
|
||||
QDebugStateSaver saver(*this);
|
||||
stream->ts.d_ptr->params.reset();
|
||||
putEscapedString(stream->ts.d_ptr.data(), reinterpret_cast<const ushort *>(begin), length);
|
||||
putEscapedString(stream->ts.d_ptr.data(), reinterpret_cast<const ushort *>(begin), int(length));
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,14 +303,14 @@ void QDebug::putByteArray(const char *begin, size_t length, Latin1Content conten
|
||||
if (stream->testFlag(Stream::NoQuotes)) {
|
||||
// no quotes, write the string directly too (no pretty-printing)
|
||||
// this respects the QTextStream state, though
|
||||
QString string = content == ContainsLatin1 ? QString::fromLatin1(begin, length) : QString::fromUtf8(begin, length);
|
||||
QString string = content == ContainsLatin1 ? QString::fromLatin1(begin, int(length)) : QString::fromUtf8(begin, int(length));
|
||||
stream->ts.d_ptr->putString(string);
|
||||
} else {
|
||||
// we'll reset the QTextStream formatting mechanisms, so save the state
|
||||
QDebugStateSaver saver(*this);
|
||||
stream->ts.d_ptr->params.reset();
|
||||
putEscapedString(stream->ts.d_ptr.data(), reinterpret_cast<const uchar *>(begin),
|
||||
length, content == ContainsLatin1);
|
||||
int(length), content == ContainsLatin1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ void qt_from_latin1(ushort *dst, const char *str, size_t size)
|
||||
dst += offset;
|
||||
str += offset;
|
||||
# ifdef Q_COMPILER_LAMBDA
|
||||
return UnrollTailLoop<15>::exec(size, [=](int i) { dst[i] = (uchar)str[i]; });
|
||||
return UnrollTailLoop<15>::exec(int(size), [=](int i) { dst[i] = (uchar)str[i]; });
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__mips_dsp)
|
||||
|
Loading…
Reference in New Issue
Block a user