Remove use of C-style casts

This commit is contained in:
staticssleever668
2021-10-11 23:28:28 +03:00
committed by Jonas Kvinge
parent 637772f8f0
commit b38ad81928
41 changed files with 84 additions and 84 deletions

View File

@@ -68,8 +68,8 @@ QDBusArgument &operator<<(QDBusArgument &arg, const QImage &image) {
// ABGR -> GBAR
QImage i(scaled.size(), scaled.format());
for (int y = 0; y < i.height(); ++y) {
QRgb *p = (QRgb*)scaled.scanLine(y);
QRgb *q = (QRgb*)i.scanLine(y);
QRgb *p = reinterpret_cast<QRgb*>(scaled.scanLine(y));
QRgb *q = reinterpret_cast<QRgb*>(i.scanLine(y));
QRgb *end = p + scaled.width();
while (p < end) {
*q = qRgba(qGreen(*p), qBlue(*p), qAlpha(*p), qRed(*p));