OpenToonz - An open-source full-featured 2D animation creation software
C
fix maddin200 pointed problems
shun-iwasawa3dd4ceafa410
diff --git a/toonz/sources/common/psdlib/psd.cpp b/toonz/sources/common/psdlib/psd.cppindex a90ba79b3..7703fe7ec 100644--- a/toonz/sources/common/psdlib/psd.cpp+++ b/toonz/sources/common/psdlib/psd.cpp@@ -176,7 +176,7 @@ bool TPSDReader::doImageResources() {hresd = FIXDPI(hres = read4Bytes(m_file));read2Bytes(m_file);read2Bytes(m_file);- vresd = FIXDPI(vres = read4Bytes(m_file));+ vresd = FIXDPI(vres = read4Bytes(m_file));m_headerInfo.vres = vresd;m_headerInfo.hres = hresd;fseek(m_file, savepos, SEEK_SET);@@ -248,7 +248,7 @@ bool TPSDReader::readLayerInfo(int i) {fseek(m_file, 6 * li->channels + 12, SEEK_CUR);skipBlock(m_file); // skip "layer info: extra data";} else {- li->chan = (TPSDChannelInfo *)mymalloc(li->channels *+ li->chan = (TPSDChannelInfo *)mymalloc(li->channels *sizeof(struct TPSDChannelInfo));li->chindex = (int *)mymalloc((li->channels + 2) * sizeof(int));li->chindex += 2; //@@ -558,7 +558,7 @@ void TPSDReader::readImageData(TRasterP &rasP, TPSDLayerInfo *li,x1 = x0 + m_region.getLx() - 1;// controllo che x1 rimanga all'interno dell'immagineif (x1 >= m_headerInfo.cols) x1 = m_headerInfo.cols - 1;- y0 = m_region.getP00().y;+ y0 = m_region.getP00().y;// se y0 è fuori dalle dimensioni dell'immagine ritorna un'immagine vuotaif (y0 >= m_headerInfo.rows) {free(rledata);@@ -640,7 +640,7 @@ void TPSDReader::readImageData(TRasterP &rasP, TPSDLayerInfo *li,m_layersSavebox[li->layerId] = layerSaveBox2;elsem_layersSavebox[0] = layerSaveBox2;- TRasterP smallRas = rasP->extract(layerSaveBox2);+ TRasterP smallRas = rasP->extract(layerSaveBox2);assert(smallRas);if (!smallRas) return;// Trovo l'indice di colonna del primo pixel del livello che deve essere letto@@ -1005,11 +1005,11 @@ void readChannel(FILE *f, TPSDLayerInfo *li,for (ch = 0; ch < channels; ++ch) {if (!li) chan[ch].id = ch;- chan[ch].rowbytes = rb;- chan[ch].comptype = comp;- chan[ch].rows = chan->rows;- chan[ch].cols = chan->cols;- chan[ch].filepos = pos;+ chan[ch].rowbytes = rb;+ chan[ch].comptype = comp;+ chan[ch].rows = chan->rows;+ chan[ch].cols = chan->cols;+ chan[ch].filepos = pos;if (!chan->rows) continue;@@ -1030,7 +1030,7 @@ void readChannel(FILE *f, TPSDLayerInfo *li,if (count > 2 * chan[ch].rowbytes) // this would be impossiblecount = last; // make a guess, to help recover- last = count;+ last = count;chan[ch].rowpos[j] = pos;pos += count;@@ -1294,9 +1294,8 @@ int TPSDParser::getLevelIdByName(std::string levelName) {levelNameCount++;}}- if (lyid == 0 && lyid < 0) lyid = 0;- if (lyid < 0 && lyid != 0)- throw TImageException(m_path, "Layer ID not exists");++ if (lyid < 0) throw TImageException(m_path, "Layer ID not exists");return lyid;}int TPSDParser::getFramesCount(int levelId) {diff --git a/toonz/sources/toonz/canvassizepopup.cpp b/toonz/sources/toonz/canvassizepopup.cppindex e6ea76a4f..c2e43b4c5 100644--- a/toonz/sources/toonz/canvassizepopup.cpp+++ b/toonz/sources/toonz/canvassizepopup.cpp@@ -137,7 +137,7 @@ int getPixelLength(double measuredLength, TMeasure *measure, double dpi,double inchValue = measure->getCurrentUnit()->convertFrom(measuredLength);return tround(inchValue * dpi);}-}+} // namespace//=============================================================================// PeggingWidget//-----------------------------------------------------------------------------@@ -266,7 +266,7 @@ void PeggingWidget::on00() {m_01->setIcon(m_topPix.transformed(QMatrix().rotate(m_cutLx ? -90 : 90),Qt::SmoothTransformation));m_11->setIcon(- m_topRightPix.transformed(QMatrix().rotate(m_cutLx || m_cutLx ? -90 : 90),+ m_topRightPix.transformed(QMatrix().rotate(m_cutLx || m_cutLy ? -90 : 90),Qt::SmoothTransformation));m_10->setIcon(m_topPix.transformed(QMatrix().rotate(m_cutLy ? 0 : 180),Qt::SmoothTransformation));@@ -601,7 +601,7 @@ void CanvasSizePopup::showEvent(QShowEvent *e) {TPointD dpi = m_sl->getDpi();double dimLx = getMeasuredLength(dim.lx, m_xMeasure, dpi.x,m_unit->currentData().toString());- double dimLy = getMeasuredLength(dim.ly, m_yMeasure, dpi.y,+ double dimLy = getMeasuredLength(dim.ly, m_yMeasure, dpi.y,m_unit->currentData().toString());m_currentXSize->setText(QString::number(dimLx));m_currentYSize->setText(QString::number(dimLy));diff --git a/toonz/sources/toonzqt/stageschematicnode.cpp b/toonz/sources/toonzqt/stageschematicnode.cppindex 0c41a99ce..dc9150f14 100644--- a/toonz/sources/toonzqt/stageschematicnode.cpp+++ b/toonz/sources/toonzqt/stageschematicnode.cpp@@ -2158,7 +2158,6 @@ void StageSchematicSplineNode::setSchematicNodePos(const QPointF &pos) const {QPixmap StageSchematicSplineNode::getPixmap() {return IconGenerator::instance()->getIcon(m_spline);- return QPixmap();}//--------------------------------------------------------