Commit 46a2818e authored by Alessandro Portale's avatar Alessandro Portale

QmlProfiler: Silence truncation warning

When building Qt Creator with MSVC, this is the only warning I get:
  warning: C4309: 'initializing': truncation of constant value

It would be great to silence it.

MSVC supports the "i8" literal extension, which would be fancier than
the cast, here. But I don't know what other compilers think of it.

Change-Id: I3f1bb4f58f6ab378cbeb44a667aebc5ddee25eec
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent 29b79144
...@@ -120,8 +120,8 @@ void QmlEventTest::testNumbers() ...@@ -120,8 +120,8 @@ void QmlEventTest::testNumbers()
void QmlEventTest::testMaxSize() void QmlEventTest::testMaxSize()
{ {
const qint8 marker1 = 0xee; const qint8 marker1 = qint8(0xee);
const qint8 marker2 = 0xbb; const qint8 marker2 = qint8(0xbb);
QmlEvent event; QmlEvent event;
QVarLengthArray<qint8> numbers(1 << 17); QVarLengthArray<qint8> numbers(1 << 17);
std::memset(numbers.data(), 0, (1 << 17)); std::memset(numbers.data(), 0, (1 << 17));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment