Fix some warnings
Change-Id: I546300b4e630a2234c83c03ece65a08f4c8652d2 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
5925daf969
commit
dfe86d0150
@ -115,6 +115,7 @@ void tst_bench_QUuid::fromRfc4122()
|
||||
QByteArray string = QByteArray::fromHex("67C8770B44F1410AAB9AF9B5446F13EE");
|
||||
QBENCHMARK {
|
||||
QUuid uuid = QUuid::fromRfc4122(string);
|
||||
Q_UNUSED(uuid)
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,6 +125,7 @@ void tst_bench_QUuid::createUuidV3()
|
||||
QByteArray name = QByteArray("Test");
|
||||
QBENCHMARK {
|
||||
QUuid uuid = QUuid::createUuidV3(ns, name);
|
||||
Q_UNUSED(uuid)
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,6 +135,7 @@ void tst_bench_QUuid::createUuidV5()
|
||||
QByteArray name = QByteArray("Test");
|
||||
QBENCHMARK {
|
||||
QUuid uuid = QUuid::createUuidV5(ns, name);
|
||||
Q_UNUSED(uuid)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ T * f(T *ts) // dummy function to prevent code from being optimized away by the
|
||||
template<typename T>
|
||||
class UseCases_QList : public UseCases<T>
|
||||
{
|
||||
void insert(int size)
|
||||
void insert(int size) override
|
||||
{
|
||||
QList<T> v;
|
||||
T t{};
|
||||
@ -65,7 +65,7 @@ class UseCases_QList : public UseCases<T>
|
||||
}
|
||||
}
|
||||
|
||||
void lookup(int size)
|
||||
void lookup(int size) override
|
||||
{
|
||||
QList<T> v;
|
||||
|
||||
@ -87,7 +87,7 @@ class UseCases_QList : public UseCases<T>
|
||||
template <typename T>
|
||||
class UseCases_stdvector : public UseCases<T>
|
||||
{
|
||||
void insert(int size)
|
||||
void insert(int size) override
|
||||
{
|
||||
std::vector<T> v;
|
||||
T t;
|
||||
@ -97,7 +97,7 @@ class UseCases_stdvector : public UseCases<T>
|
||||
}
|
||||
}
|
||||
|
||||
void lookup(int size)
|
||||
void lookup(int size) override
|
||||
{
|
||||
std::vector<T> v;
|
||||
|
||||
|
@ -88,9 +88,25 @@ const char *algoname(int i)
|
||||
return "keccak_384-";
|
||||
case QCryptographicHash::Keccak_512:
|
||||
return "keccak_512-";
|
||||
case QCryptographicHash::Blake2b_160:
|
||||
return "blake2b_160-";
|
||||
case QCryptographicHash::Blake2b_256:
|
||||
return "blake2b_256-";
|
||||
case QCryptographicHash::Blake2b_384:
|
||||
return "blake2b_384-";
|
||||
case QCryptographicHash::Blake2b_512:
|
||||
return "blake2b_512-";
|
||||
case QCryptographicHash::Blake2s_128:
|
||||
return "blake2s_128-";
|
||||
case QCryptographicHash::Blake2s_160:
|
||||
return "blake2s_160-";
|
||||
case QCryptographicHash::Blake2s_224:
|
||||
return "blake2s_224-";
|
||||
case QCryptographicHash::Blake2s_256:
|
||||
return "blake2s_256-";
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
tst_bench_QCryptographicHash::tst_bench_QCryptographicHash()
|
||||
|
@ -221,7 +221,7 @@ void tst_qrect::intersected()
|
||||
QRect r1(rf1.toRect());
|
||||
QRect r2(rf2.toRect());
|
||||
QBENCHMARK {
|
||||
r1.intersected(r2);
|
||||
Q_UNUSED(r1.intersected(r2))
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ void tst_qrect::united()
|
||||
QRect r1(rf1.toRect());
|
||||
QRect r2(rf2.toRect());
|
||||
QBENCHMARK {
|
||||
r1.united(r2);
|
||||
Q_UNUSED(r1.united(r2))
|
||||
}
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ void tst_qrect::intersected_f()
|
||||
QFETCH(QRectF, rf1);
|
||||
QFETCH(QRectF, rf2);
|
||||
QBENCHMARK {
|
||||
rf1.intersected(rf2);
|
||||
Q_UNUSED(rf1.intersected(rf2))
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ void tst_qrect::united_f()
|
||||
QFETCH(QRectF, rf1);
|
||||
QFETCH(QRectF, rf2);
|
||||
QBENCHMARK {
|
||||
rf1.united(rf2);
|
||||
Q_UNUSED(rf1.united(rf2))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,8 @@ void tst_QMatrix4x4::mapVector3D()
|
||||
m1.optimize();
|
||||
|
||||
QBENCHMARK {
|
||||
result = m1 * v;
|
||||
result = m1.map(v);
|
||||
Q_UNUSED(result)
|
||||
}
|
||||
|
||||
// Force the result to be stored so the compiler doesn't
|
||||
@ -234,7 +235,8 @@ void tst_QMatrix4x4::mapVector2D()
|
||||
m1.optimize();
|
||||
|
||||
QBENCHMARK {
|
||||
result = m1 * v;
|
||||
result = m1.map(v);
|
||||
Q_UNUSED(result)
|
||||
}
|
||||
|
||||
// Force the result to be stored so the compiler doesn't
|
||||
|
@ -102,6 +102,7 @@ void tst_QQuaternion::multiply()
|
||||
|
||||
QBENCHMARK {
|
||||
QQuaternion q3 = q1 * q2;
|
||||
Q_UNUSED(q3)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ void tst_QTransform::adjoint()
|
||||
{
|
||||
QFETCH(QTransform, transform);
|
||||
QBENCHMARK {
|
||||
transform.adjoint();
|
||||
Q_UNUSED(transform.adjoint())
|
||||
}
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@ void tst_QTransform::transposed()
|
||||
{
|
||||
QFETCH(QTransform, transform);
|
||||
QBENCHMARK {
|
||||
transform.transposed();
|
||||
Q_UNUSED(transform.transposed())
|
||||
}
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ void tst_QTransform::inverted()
|
||||
{
|
||||
QFETCH(QTransform, transform);
|
||||
QBENCHMARK {
|
||||
transform.inverted();
|
||||
Q_UNUSED(transform.inverted())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,7 @@ void tst_QGraphicsScene::itemAt()
|
||||
QGraphicsItem *item = 0;
|
||||
QBENCHMARK {
|
||||
item = scene.items(QPointF(0, 0)).value(0, nullptr);
|
||||
Q_UNUSED(item)
|
||||
}
|
||||
|
||||
//let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list
|
||||
|
Loading…
Reference in New Issue
Block a user