From 5c6762c53d47b3bd3b604afd389669a3670b1ec5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 4 Jun 2019 11:58:35 +0200 Subject: Fix clang warnings about repetitive type names Fix warning like: warning: use auto when initializing with new/reinterpret_cast to avoid duplicating the type name [modernize-use-auto] Change-Id: I46919c041f6a217e098b82c9f7f6548e0a0a9ec5 Reviewed-by: Oliver Wolff --- tests/auto/qpixmap/tst_qpixmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/qpixmap/tst_qpixmap.cpp') diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index b028f52..2791cd2 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -101,7 +101,7 @@ void tst_QPixmap::toHBITMAP() const HDC displayDc = GetDC(nullptr); const HDC bitmapDc = CreateCompatibleDC(displayDc); - const HBITMAP nullBitmap = static_cast(SelectObject(bitmapDc, bitmap)); + const auto nullBitmap = static_cast(SelectObject(bitmapDc, bitmap)); const COLORREF pixel = GetPixel(bitmapDc, 0, 0); QCOMPARE(int(GetRValue(pixel)), red); @@ -264,7 +264,7 @@ void tst_QPixmap::fromHICON() const QString iconFileName = image + QStringLiteral(".ico"); QVERIFY2(QFileInfo::exists(iconFileName), qPrintable(iconFileName)); - const HICON icon = + const auto icon = static_cast(LoadImage(nullptr, reinterpret_cast(iconFileName.utf16()), IMAGE_ICON, width, height, LR_LOADFROMFILE)); const QImage imageFromHICON = QtWin::fromHICON(icon).toImage(); -- cgit v1.2.3