From ce404f52a80fe08a92a9e8167369739f26a5a69f Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 13 Aug 2019 08:42:09 +0200 Subject: [PATCH] Use C++ cast instead of c-style Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23121 --- libkwineffects/kwineffects.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index e50ce09b92..f248ea78b4 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -1159,8 +1159,8 @@ void WindowQuadList::makeInterleavedArrays(unsigned int type, GLVertex2D *vertic v[j].texcoord = QVector2D(wv.u(), wv.v()) * coeff + offset; } - const __m128i *srcP = (const __m128i *) &v; - __m128i *dstP = (__m128i *) vertex; + const __m128i *srcP = reinterpret_cast(&v); + __m128i *dstP = reinterpret_cast<__m128i *>(vertex); _mm_stream_si128(&dstP[0], _mm_load_si128(&srcP[0])); // Top-left _mm_stream_si128(&dstP[1], _mm_load_si128(&srcP[1])); // Top-right @@ -1202,8 +1202,8 @@ void WindowQuadList::makeInterleavedArrays(unsigned int type, GLVertex2D *vertic v[j].texcoord = QVector2D(wv.u(), wv.v()) * coeff + offset; } - const __m128i *srcP = (const __m128i *) &v; - __m128i *dstP = (__m128i *) vertex; + const __m128i *srcP = reinterpret_cast(&v); + __m128i *dstP = reinterpret_cast<__m128i *>(vertex); __m128i src[4]; src[0] = _mm_load_si128(&srcP[0]); // Top-left