Commit 3071d408 authored by Halla Rempt's avatar Halla Rempt
Browse files

fix warning: uninitialized variable

parent 703886ad
......@@ -24,8 +24,8 @@
#include <QColor>
PSDColorModeBlock::PSDColorModeBlock(PSDColorMode colormode)
: blocksize(0)
, colormode(colormode)
: blocksize(0)
, colormode(colormode)
{
}
......@@ -52,14 +52,11 @@ bool PSDColorModeBlock::read(QIODevice* io)
if ((quint32)data.size() != blocksize) return false;
if (colormode == Indexed) {
for (int i=0; i<=767;)
{
colormap.append(qRgb(data[i],data[i++],data[i++]));
//qDebug()<<colormap<<i;
int i = 0;
while (i <= 767) {
colormap.append(qRgb(data[i],data[i + 1],data[i + 2]));
i += 2;
}
}
return valid();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment