From 40f9ec5fa66b4a545a534df9fb11b48d22e3357d Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 12 Jan 2021 03:58:19 +0200 Subject: [PATCH] properly indent qxbmhandler source file Signed-off-by: Ivailo Monev --- src/gui/image/qxbmhandler.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp index a6dd6e1f6..ad6b4d7e1 100644 --- a/src/gui/image/qxbmhandler.cpp +++ b/src/gui/image/qxbmhandler.cpp @@ -95,7 +95,7 @@ static bool read_xbm_header(QIODevice *device, int& w, int& h) // "#define .._height " readBytes = device->readLine(buf, buflen); if (readBytes <= 0) - return false; + return false; buf[readBytes - 1] = '\0'; sbuf = QString::fromLatin1(buf); @@ -175,11 +175,11 @@ static bool read_xbm_image(QIODevice *device, QImage *outImage) static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const QString &fileName) { QImage image = sourceImage; - int w = image.width(); - int h = image.height(); - int i; - int msize = fileName.length() + 100; - char *buf = new char[msize]; + int w = image.width(); + int h = image.height(); + int i; + int msize = fileName.length() + 100; + char *buf = new char[msize]; qsnprintf(buf, msize, "#define %s_width %d\n", fileName.toAscii().data(), w); device->write(buf, qstrlen(buf)); @@ -194,16 +194,15 @@ static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const bool invert = qGray(image.color(0)) < qGray(image.color(1)); char hexrep[16]; for (i=0; i<10; i++) - hexrep[i] = '0' + i; + hexrep[i] = '0' + i; for (i=10; i<16; i++) - hexrep[i] = 'a' -10 + i; + hexrep[i] = 'a' -10 + i; if (invert) { - char t; - for (i=0; i<8; i++) { - t = hexrep[15-i]; - hexrep[15-i] = hexrep[i]; - hexrep[i] = t; - } + for (i=0; i<8; i++) { + char t = hexrep[15-i]; + hexrep[15-i] = hexrep[i]; + hexrep[i] = t; + } } int bcnt = 0; char *p = buf; -- 2.11.0