Skip to content

Commit 93971d5

Browse files
committed
[sip] align pointer and reference in blacklisted files
this will facilitate sip diff checking
1 parent e581d46 commit 93971d5

File tree

236 files changed

+1842
-1842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+1842
-1842
lines changed

python/core/conversions.sip

+31-31
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ template <TYPE>
4141
if ((l = PyList_New(sipCpp->size())) == NULL)
4242
return NULL;
4343

44-
const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
44+
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
4545

4646
// Set the list elements.
4747
for (int i = 0; i < sipCpp->size(); ++i)
4848
{
49-
QVector<TYPE>* t = new QVector<TYPE>(sipCpp->at(i));
49+
QVector<TYPE> *t = new QVector<TYPE>(sipCpp->at(i));
5050
PyObject *tobj;
5151

5252
if ((tobj = sipConvertFromMappedType(t, qvector_qgspoint, sipTransferObj)) == NULL)
@@ -62,7 +62,7 @@ template <TYPE>
6262
%End
6363

6464
%ConvertToTypeCode
65-
const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
65+
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QgsPoint>");
6666

6767
// Check the type if that is all that is required.
6868
if (sipIsErr == NULL)
@@ -84,7 +84,7 @@ template <TYPE>
8484
{
8585
int state;
8686
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
87-
QVector<TYPE> * t = reinterpret_cast< QVector<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
87+
QVector<TYPE> *t = reinterpret_cast< QVector<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
8888

8989
if (*sipIsErr)
9090
{
@@ -118,12 +118,12 @@ template <TYPE>
118118
if ((l = PyList_New(sipCpp->size())) == NULL)
119119
return NULL;
120120

121-
const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
121+
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
122122

123123
// Set the list elements.
124124
for (int i = 0; i < sipCpp->size(); ++i)
125125
{
126-
QVector<QVector<TYPE> >* t = new QVector<QVector<TYPE> >(sipCpp->at(i));
126+
QVector<QVector<TYPE> > *t = new QVector<QVector<TYPE> >(sipCpp->at(i));
127127
PyObject *tobj;
128128

129129
if ((tobj = sipConvertFromMappedType(t, qvector_qgspoint, sipTransferObj)) == NULL)
@@ -139,7 +139,7 @@ template <TYPE>
139139

140140
%ConvertToTypeCode
141141

142-
const sipMappedType* qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
142+
const sipMappedType *qvector_qgspoint = sipFindMappedType("QVector<QVector<QgsPoint> >");
143143

144144
// Check the type if that is all that is required.
145145
if (sipIsErr == NULL)
@@ -161,7 +161,7 @@ template <TYPE>
161161
{
162162
int state;
163163
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
164-
QVector<QVector<TYPE> > * t = reinterpret_cast< QVector< QVector<TYPE> > * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
164+
QVector<QVector<TYPE> > *t = reinterpret_cast< QVector< QVector<TYPE> > * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
165165

166166
if (*sipIsErr)
167167
{
@@ -194,12 +194,12 @@ template <TYPE>
194194
if ((l = PyList_New(sipCpp->size())) == NULL)
195195
return NULL;
196196

197-
const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");
197+
const sipMappedType *qlist_type = sipFindMappedType("QList<TYPE>");
198198

199199
// Set the list elements.
200200
for (int i = 0; i < sipCpp->size(); ++i)
201201
{
202-
QList<TYPE>* t = new QList<TYPE>(sipCpp->at(i));
202+
QList<TYPE> *t = new QList<TYPE>(sipCpp->at(i));
203203
PyObject *tobj;
204204

205205
if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
@@ -215,7 +215,7 @@ template <TYPE>
215215
%End
216216

217217
%ConvertToTypeCode
218-
const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");
218+
const sipMappedType *qlist_type = sipFindMappedType("QList<TYPE>");
219219

220220
// Check the type if that is all that is required.
221221
if (sipIsErr == NULL)
@@ -237,7 +237,7 @@ template <TYPE>
237237
{
238238
int state;
239239
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
240-
QList<TYPE> * t = reinterpret_cast< QList<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
240+
QList<TYPE> *t = reinterpret_cast< QList<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
241241

242242
if (*sipIsErr)
243243
{
@@ -269,12 +269,12 @@ template <TYPE>
269269
if ((l = PyList_New(sipCpp->size())) == NULL)
270270
return NULL;
271271

272-
const sipMappedType* qlist_type = sipFindMappedType("QList<QgsPointV2>");
272+
const sipMappedType *qlist_type = sipFindMappedType("QList<QgsPointV2>");
273273

274274
// Set the list elements.
275275
for (int i = 0; i < sipCpp->size(); ++i)
276276
{
277-
QList<QgsPointV2>* t = new QList<QgsPointV2>(sipCpp->at(i));
277+
QList<QgsPointV2> *t = new QList<QgsPointV2>(sipCpp->at(i));
278278
PyObject *tobj;
279279

280280
if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
@@ -290,7 +290,7 @@ template <TYPE>
290290
%End
291291

292292
%ConvertToTypeCode
293-
const sipMappedType* qlist_type = sipFindMappedType("QList<QgsPointV2>");
293+
const sipMappedType *qlist_type = sipFindMappedType("QList<QgsPointV2>");
294294

295295
// Check the type if that is all that is required.
296296
if (sipIsErr == NULL)
@@ -312,7 +312,7 @@ template <TYPE>
312312
{
313313
int state;
314314
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
315-
QList<QgsPointV2> * t = reinterpret_cast< QList<QgsPointV2> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
315+
QList<QgsPointV2> *t = reinterpret_cast< QList<QgsPointV2> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
316316

317317
if (*sipIsErr)
318318
{
@@ -342,15 +342,15 @@ template <TYPE>
342342
{
343343
return NULL;
344344
}
345-
const sipMappedType* qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
345+
const sipMappedType *qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
346346
if(!qlist_type )
347347
{
348348
Py_DECREF(l); return NULL;
349349
}
350350

351351
for (int i = 0; i < sipCpp->size(); ++i)
352352
{
353-
QList< QList<QgsPointV2> >* t = new QList<QList<QgsPointV2> >(sipCpp->at(i));
353+
QList< QList<QgsPointV2> > *t = new QList<QList<QgsPointV2> >(sipCpp->at(i));
354354
PyObject *tobj;
355355
if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
356356
{
@@ -363,12 +363,12 @@ template <TYPE>
363363
return l;
364364
%End
365365
%ConvertToTypeCode
366-
const sipMappedType* qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
366+
const sipMappedType *qlist_type = sipFindMappedType("QList<QList<QgsPointV2> >");
367367
if (sipIsErr == NULL)
368368
{
369369
return 0;
370370
}
371-
QList< QList< QList<QgsPointV2> > >* ql = new QList< QList< QList<QgsPointV2> > >();
371+
QList< QList< QList<QgsPointV2> > > *ql = new QList< QList< QList<QgsPointV2> > >();
372372
for( int i = 0;i < PyList_GET_SIZE(sipPy); ++i)
373373
{
374374
int state;
@@ -597,12 +597,12 @@ template<TYPE>
597597
if ((d = PyDict_New()) == NULL)
598598
return NULL;
599599

600-
const sipMappedType* qmap2 = sipFindMappedType("QMap<int, TYPE>");
600+
const sipMappedType *qmap2 = sipFindMappedType("QMap<int, TYPE>");
601601

602602
// Set the list elements.
603603
for (QMap<qint64, QMap<int, TYPE> >::iterator it = sipCpp->begin(); it != sipCpp->end(); ++it)
604604
{
605-
QMap<int, TYPE>* t = new QMap<int, TYPE>(*it);
605+
QMap<int, TYPE> *t = new QMap<int, TYPE>(*it);
606606

607607
PyObject *kobj = PyLong_FromLongLong(it.key());
608608
PyObject *tobj = sipConvertFromMappedType(t, qmap2, sipTransferObj);
@@ -677,7 +677,7 @@ template<TYPE>
677677
int k2 = PyLong_AsLong(kobj2);
678678
int state;
679679

680-
TYPE* t2 = reinterpret_cast<TYPE*>(sipConvertToType(tobj2, sipType_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
680+
TYPE *t2 = reinterpret_cast<TYPE*>(sipConvertToType(tobj2, sipType_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
681681

682682
if (*sipIsErr)
683683
{
@@ -1125,7 +1125,7 @@ template<double, TYPE>
11251125
for (i = sipCpp->begin(); i != sipCpp->end(); ++i)
11261126
{
11271127
PyObject *t1obj = PyFloat_FromDouble(i.key());
1128-
TYPE* t2 = &i.value();
1128+
TYPE *t2 = &i.value();
11291129
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE, sipTransferObj);
11301130

11311131
if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
@@ -1220,7 +1220,7 @@ template<double, TYPE2>
12201220
{
12211221

12221222
const double t1 = i.key();
1223-
TYPE2 * t2 = &i.value();
1223+
TYPE2 *t2 = &i.value();
12241224
PyObject *t1obj = PyFloat_FromDouble(t1);
12251225
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE2, sipTransferObj);
12261226
if (PyDict_GetItem(d, t1obj) == NULL) {
@@ -1337,7 +1337,7 @@ template<int, TYPE2*>
13371337
{
13381338

13391339
const int t1 = i.key();
1340-
TYPE2 * t2 = i.value();
1340+
TYPE2 *t2 = i.value();
13411341
PyObject *t1obj = PyLong_FromSize_t(t1);
13421342
PyObject *t2obj = sipConvertFromType(t2, sipType_TYPE2, sipTransferObj);
13431343
if (PyDict_GetItem(d, t1obj) == NULL)
@@ -1729,10 +1729,10 @@ template <TYPE>
17291729

17301730
for (QMap<qint64, QgsFeature*>::iterator it = sipCpp->begin(); it != sipCpp->end(); ++it)
17311731
{
1732-
QgsFeature* oobj = new QgsFeature(*it.value());
1732+
QgsFeature *oobj = new QgsFeature(*it.value());
17331733

1734-
PyObject* keyobj = PyLong_FromLong(it.key());
1735-
PyObject* pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
1734+
PyObject *keyobj = PyLong_FromLong(it.key());
1735+
PyObject *pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
17361736
PyDict_SetItem(d, keyobj, pyOobj);
17371737

17381738
if(pyOobj == NULL || keyobj == NULL || PyDict_SetItem(d, keyobj, pyOobj) < 0)
@@ -1767,7 +1767,7 @@ template <TYPE>
17671767
{
17681768
int state;
17691769
qint64 t1 = PyLong_AsLongLong(t1obj);
1770-
QgsFeature* t2 = reinterpret_cast<QgsFeature*>(sipConvertToType(t2obj, sipType_QgsFeature, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
1770+
QgsFeature *t2 = reinterpret_cast<QgsFeature*>(sipConvertToType(t2obj, sipType_QgsFeature, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
17711771

17721772
if (*sipIsErr)
17731773
{
@@ -1906,7 +1906,7 @@ bool null_from_qvariant_converter( const QVariant *varp, PyObject **objp )
19061906
if ( varp->isNull() && varp->type() != QVariant::ByteArray )
19071907
{
19081908
sWatchDog = true;
1909-
PyObject* vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type );
1909+
PyObject *vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type );
19101910
*objp = PyObject_Call(( PyObject * )sipTypeAsPyTypeObject( sipType_QVariant ), PyTuple_Pack( 1, vartype ), nullptr );
19111911
sWatchDog = false;
19121912
return true;

python/core/qgis.sip

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Qgis
3737
// Release name
3838
static const QString QGIS_RELEASE_NAME;
3939
// The development version
40-
static const char* QGIS_DEV_VERSION;
40+
static const char *QGIS_DEV_VERSION;
4141

4242
// Enumerations
4343
//
@@ -112,7 +112,7 @@ class Qgis
112112
* @note added in version 2.9
113113
* @see permissiveToInt
114114
*/
115-
double qgsPermissiveToDouble( QString string, bool& ok );
115+
double qgsPermissiveToDouble( QString string, bool &ok );
116116

117117
/** Converts a string to an integer in a permissive way, e.g., allowing for incorrect
118118
* numbers of digits between thousand separators
@@ -122,18 +122,18 @@ double qgsPermissiveToDouble( QString string, bool& ok );
122122
* @note added in version 2.9
123123
* @see permissiveToDouble
124124
*/
125-
int qgsPermissiveToInt( QString string, bool& ok );
125+
int qgsPermissiveToInt( QString string, bool &ok );
126126
//! Compares two QVariant values and returns whether the first is less than the second.
127127
//! Useful for sorting lists of variants, correctly handling sorting of the various
128128
//! QVariant data types (such as strings, numeric values, dates and times)
129129
//! @see qgsVariantGreaterThan()
130-
bool qgsVariantLessThan( const QVariant& lhs, const QVariant& rhs );
130+
bool qgsVariantLessThan( const QVariant &lhs, const QVariant &rhs );
131131

132132
//! Compares two QVariant values and returns whether the first is greater than the second.
133133
//! Useful for sorting lists of variants, correctly handling sorting of the various
134134
//! QVariant data types (such as strings, numeric values, dates and times)
135135
//! @see qgsVariantLessThan()
136-
bool qgsVariantGreaterThan( const QVariant& lhs, const QVariant& rhs );
136+
bool qgsVariantGreaterThan( const QVariant &lhs, const QVariant &rhs );
137137

138138
/** Wkt string that represents a geographic coord sys
139139
* @note added to replace GEOWkt

python/core/qgscachedfeatureiterator.sip

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
1111
* @param vlCache The vector layer cache to use
1212
* @param featureRequest The feature request to answer
1313
*/
14-
QgsCachedFeatureIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
14+
QgsCachedFeatureIterator( QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest );
1515

1616
/**
1717
* Rewind to the beginning of the iterator
@@ -37,15 +37,15 @@ class QgsCachedFeatureIterator : QgsAbstractFeatureIterator
3737
*
3838
* @see bool getFeature( QgsFeature& f )
3939
*/
40-
virtual bool fetchFeature( QgsFeature& f );
40+
virtual bool fetchFeature( QgsFeature &f );
4141

4242
/**
4343
* We have a local special iterator for FilterFids, no need to run the generic.
4444
*
4545
* @param f Will write to this feature
4646
* @return bool true if the operation was ok
4747
*/
48-
virtual bool nextFeatureFilterFids( QgsFeature& f );
48+
virtual bool nextFeatureFilterFids( QgsFeature &f );
4949

5050
};
5151

@@ -66,7 +66,7 @@ class QgsCachedFeatureWriterIterator : QgsAbstractFeatureIterator
6666
* @param vlCache The vector layer cache to use
6767
* @param featureRequest The feature request to answer
6868
*/
69-
QgsCachedFeatureWriterIterator( QgsVectorLayerCache* vlCache, const QgsFeatureRequest& featureRequest );
69+
QgsCachedFeatureWriterIterator( QgsVectorLayerCache *vlCache, const QgsFeatureRequest &featureRequest );
7070

7171
/**
7272
* Rewind to the beginning of the iterator
@@ -92,5 +92,5 @@ class QgsCachedFeatureWriterIterator : QgsAbstractFeatureIterator
9292
*
9393
* @see bool getFeature( QgsFeature& f )
9494
*/
95-
virtual bool fetchFeature( QgsFeature& f );
95+
virtual bool fetchFeature( QgsFeature &f );
9696
};

python/core/qgscacheindex.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QgsAbstractCacheIndex
2828
* @param featureRequest The feature request that was answered
2929
* @param fids The feature ids that have been returned
3030
*/
31-
virtual void requestCompleted( const QgsFeatureRequest& featureRequest, const QgsFeatureIds& fids );
31+
virtual void requestCompleted( const QgsFeatureRequest &featureRequest, const QgsFeatureIds &fids );
3232

3333
/**
3434
* Is called, when a feature request is issued on a cached layer.
@@ -44,5 +44,5 @@ class QgsAbstractCacheIndex
4444
* @return True, if this index holds the information to answer the request.
4545
*
4646
*/
47-
virtual bool getCacheIterator( QgsFeatureIterator& featureIterator, const QgsFeatureRequest& featureRequest ) = 0;
47+
virtual bool getCacheIterator( QgsFeatureIterator &featureIterator, const QgsFeatureRequest &featureRequest ) = 0;
4848
};

python/core/qgscacheindexfeatureid.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class QgsCacheIndexFeatureId : QgsAbstractCacheIndex
88

99
virtual void flushFeature( const QgsFeatureId fid );
1010
virtual void flush();
11-
virtual void requestCompleted( const QgsFeatureRequest& featureRequest, const QgsFeatureIds& fids );
12-
virtual bool getCacheIterator( QgsFeatureIterator& featureIterator, const QgsFeatureRequest& featureRequest );
11+
virtual void requestCompleted( const QgsFeatureRequest &featureRequest, const QgsFeatureIds &fids );
12+
virtual bool getCacheIterator( QgsFeatureIterator &featureIterator, const QgsFeatureRequest &featureRequest );
1313
};

python/core/qgsdartmeasurement.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class QgsDartMeasurement
1313

1414
QgsDartMeasurement();
1515

16-
QgsDartMeasurement( const QString& name, Type type, const QString& value );
16+
QgsDartMeasurement( const QString &name, Type type, const QString &value );
1717

1818
const QString toString() const;
1919

python/core/qgsdataitemprovider.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class QgsDataItemProvider
1515

1616
//! Create a new instance of QgsDataItem (or null) for given path and parent item.
1717
//! Caller takes responsibility of deleting created items.
18-
virtual QgsDataItem* createDataItem( const QString& path, QgsDataItem* parentItem ) = 0 /Factory/;
18+
virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 /Factory/;
1919

2020
};

python/core/qgsdataitemproviderregistry.sip

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ class QgsDataItemProviderRegistry
1818
QList<QgsDataItemProvider*> providers() const;
1919

2020
//! Add a provider implementation. Takes ownership of the object.
21-
void addProvider( QgsDataItemProvider* provider /Transfer/ );
21+
void addProvider( QgsDataItemProvider *provider /Transfer/ );
2222

2323
//! Remove provider implementation from the list (provider object is deleted)
24-
void removeProvider( QgsDataItemProvider* provider );
24+
void removeProvider( QgsDataItemProvider *provider );
2525

2626
private:
2727

28-
QgsDataItemProviderRegistry( const QgsDataItemProviderRegistry& rh );
28+
QgsDataItemProviderRegistry( const QgsDataItemProviderRegistry &rh );
2929

3030
};

0 commit comments

Comments
 (0)