From 2658f95d3c3aafe3d3da20bf02d597f70277cd8f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 4 Aug 2021 16:40:24 +0200 Subject: [PATCH] QXpmHandler: clean up write_xpm_image: scope variables better MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... and fix spacing around operators and after flow-control keywords. Change-Id: Iefaa03074536d13a655c91fb42aef6aa96c2665b Reviewed-by: MÃ¥rten Nordheim --- src/gui/image/qxpmhandler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp index f9247f9ff0..ae3fc8128d 100644 --- a/src/gui/image/qxpmhandler.cpp +++ b/src/gui/image/qxpmhandler.cpp @@ -1128,12 +1128,11 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const const int w = image.width(); const int h = image.height(); int ncolors = 0; - int x, y; // build color table - for(y=0; y(image.constScanLine(y)); - for(x=0; x(image.constScanLine(y)); - for(x=0; x