summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-08-04 16:38:36 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-08-05 03:58:49 +0200
commitf1ab1132ea6f8be5cf41e9bd77d5f582d5e25ee0 (patch)
tree9ccf9ba3d94cbcc6c5ebca0964d233170d635610 /src
parent70adce61ad8f0df8bdf5f62859cffd75fb7d5843 (diff)
QXpmHandler: clean up write_xpm_image: make w,h const
... and use one variable definition per line. Change-Id: Ie8e6d6fb9e570cf715ab0b39c78d677f1e5a19a7 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qxpmhandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp
index ecfce93ee5..d00c887b71 100644
--- a/src/gui/image/qxpmhandler.cpp
+++ b/src/gui/image/qxpmhandler.cpp
@@ -1118,7 +1118,9 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
QMap<QRgb, int> colorMap;
- int w = image.width(), h = image.height(), ncolors = 0;
+ const int w = image.width();
+ const int h = image.height();
+ int ncolors = 0;
int x, y;
// build color table