Remove use of C-style casts
This commit is contained in:
committed by
Jonas Kvinge
parent
637772f8f0
commit
b38ad81928
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user