r22685 by jghali - fix signed/unsigned comparison warnings and some indice names in for loops
scribus-commit
scribus-commit at lists.scribus.net
Thu Sep 13 10:58:50 UTC 2018
Author: jghali
Date: Thu Sep 13 10:58:50 2018
New Revision: 22685
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22685
Log:
fix signed/unsigned comparison warnings and some indice names in for loops
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/scpattern.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22685&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Thu Sep 13 10:58:50 2018
@@ -4249,7 +4249,7 @@
pat.xoffset = attrs.valueAsDouble("xoffset", 0.0);
pat.yoffset = attrs.valueAsDouble("yoffset", 0.0);
- uint itemCount1 = m_Doc->Items->count();
+ int itemCount1 = m_Doc->Items->count();
bool savedAlignGrid = m_Doc->SnapGrid;
bool savedAlignGuides = m_Doc->SnapGuides;
bool savedAlignElement = m_Doc->SnapElement;
@@ -4439,7 +4439,7 @@
}
}
- uint itemCount2 = m_Doc->Items->count();
+ int itemCount2 = m_Doc->Items->count();
if (itemCount2 > itemCount1)
{
PageItem* currItem = doc->Items->at(itemCount1), *newItem;
@@ -4447,9 +4447,9 @@
double miny = std::numeric_limits<double>::max();
double maxx = -std::numeric_limits<double>::max();
double maxy = -std::numeric_limits<double>::max();
- for (uint as = itemCount1; as < itemCount2; ++as)
- {
- currItem = doc->Items->at(as);
+ for (int i = itemCount1; i < itemCount2; ++i)
+ {
+ currItem = doc->Items->at(i);
double x1, x2, y1, y2;
currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
minx = qMin(minx, x1);
@@ -4457,7 +4457,7 @@
maxx = qMax(maxx, x2);
maxy = qMax(maxy, y2);
}
- for (uint as = itemCount1; as < itemCount2; ++as)
+ for (int i = itemCount1; i < itemCount2; ++i)
{
newItem = doc->Items->takeAt(itemCount1);
newItem->gXpos = newItem->xPos() - minx;
Modified: trunk/Scribus/scribus/scpattern.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22685&path=/trunk/Scribus/scribus/scpattern.cpp
==============================================================================
--- trunk/Scribus/scribus/scpattern.cpp (original)
+++ trunk/Scribus/scribus/scpattern.cpp Thu Sep 13 10:58:50 2018
@@ -96,9 +96,9 @@
pattern.fill( qRgba(0, 0, 0, 0) );
ScPainter *painter = new ScPainter(&pattern, pattern.width(), pattern.height(), 1, 0);
painter->setZoomFactor(sc);
- for (int em = 0; em < items.count(); ++em)
+ for (int i = 0; i < items.count(); ++i)
{
- PageItem* embedded = items.at(em);
+ PageItem* embedded = items.at(i);
painter->save();
painter->translate(embedded->gXpos, embedded->gYpos);
embedded->isEmbedded = true;
More information about the scribus-commit
mailing list