forked from qt-creator/qt-creator
QmlProfiler: Avoid some compiler warnings
If size_t is 32bit wide, any comparison to qint64Max is pointless. And in order to compare a size_t to intMax, we need to cast intMax to size_t. Change-Id: Ida1945ca0cd8865b8d8620c8b23b7e21a20dc43c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
{
|
||||
static const qint64 qint64Max = std::numeric_limits<qint64>::max();
|
||||
size_t size = durations.size();
|
||||
QTC_ASSERT(size <= qint64Max, size = qint64Max);
|
||||
QTC_ASSERT(sizeof(size_t) < sizeof(qint64) || size <= qint64Max, size = qint64Max);
|
||||
calls = static_cast<qint64>(size);
|
||||
|
||||
if (size == 0)
|
||||
|
||||
Reference in New Issue
Block a user