r22690 by jghali - fix signed/unsigned comparison warnings
scribus-commit
scribus-commit at lists.scribus.net
Thu Sep 13 16:49:06 UTC 2018
Author: jghali
Date: Thu Sep 13 16:49:06 2018
New Revision: 22690
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22690
Log:
fix signed/unsigned comparison warnings
Modified:
trunk/Scribus/scribus/canvas.h
trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22690&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h (original)
+++ trunk/Scribus/scribus/canvas.h Thu Sep 13 16:49:06 2018
@@ -82,8 +82,8 @@
Q_OBJECT
public:
- static const uint moveWithFullOutlinesThreshold = 21;
- static const uint moveWithBoxesOnlyThreshold = 41;
+ static const int moveWithFullOutlinesThreshold = 21;
+ static const int moveWithBoxesOnlyThreshold = 41;
Canvas(ScribusDoc* doc, ScribusView* parent);
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22690&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp Thu Sep 13 16:49:06 2018
@@ -300,12 +300,11 @@
int pageNr = currentDoc->currentPageNumber();
char *kwlist[] = {const_cast<char*>(""), const_cast<char*>("page"), nullptr};
-
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwlist, &typ, &pageNr))
return nullptr;
- int numpages = currentDoc->Pages->count();
- if (pageNr < 0 || pageNr >= numpages) {
+ int numPages = currentDoc->Pages->count();
+ if (pageNr < 0 || pageNr >= numPages) {
PyErr_SetString(PyExc_RuntimeError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
return nullptr;
}
@@ -318,7 +317,7 @@
{
for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
{
- if ((currentDoc->Items->at(lam2)->itemType() == typ) && (pageNr == static_cast<uint>(currentDoc->Items->at(lam2)->OwnPage)))
+ if ((currentDoc->Items->at(lam2)->itemType() == typ) && (pageNr == currentDoc->Items->at(lam2)->OwnPage))
counter++;
}
}
@@ -326,7 +325,7 @@
{
for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
{
- if (pageNr == static_cast<uint>(currentDoc->Items->at(lam2)->OwnPage))
+ if (pageNr == currentDoc->Items->at(lam2)->OwnPage)
counter++;
}
}
@@ -334,7 +333,7 @@
l = PyList_New(counter);
for (int lam=0; lam < currentDoc->Items->count(); ++lam)
{
- if (pageNr == static_cast<uint>(currentDoc->Items->at(lam)->OwnPage))
+ if (pageNr == currentDoc->Items->at(lam)->OwnPage)
{
if (typ != -1)
{
More information about the scribus-commit
mailing list