Skip to content

Commit 4a28f76

Browse files
author
wonder
committed
Made setGeometry() argument const.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8736 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6954c1a commit 4a28f76

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

python/core/qgsfeature.sip

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class QgsFeature
6060
*/
6161
const QMap<int, QVariant> & attributeMap() const;
6262

63-
64-
/**Sets all the attributes in one go*/
63+
64+
/**Sets all the attributes in one go*/
6565
void setAttributeMap(const QMap<int, QVariant> & attributeMap);
6666

6767
/**
@@ -114,7 +114,7 @@ class QgsFeature
114114

115115
/** Set this feature's geometry from another QgsGeometry object (deep copy)
116116
*/
117-
void setGeometry(QgsGeometry& geom);
117+
void setGeometry(const QgsGeometry& geom);
118118

119119
/** Set this feature's geometry (takes geometry ownership)
120120
*/

src/core/qgsfeature.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void QgsFeature::setTypeName(QString typeName)
237237
} // QgsFeature::typeName
238238

239239

240-
void QgsFeature::setGeometry(QgsGeometry& geom)
240+
void QgsFeature::setGeometry(const QgsGeometry& geom)
241241
{
242242
// Destruct the attached geometry only if we still own it, before assigning new one.
243243
if ( (mOwnsGeometry) && (mGeometry) )

src/core/qgsfeature.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class CORE_EXPORT QgsFeature {
154154

155155
/** Set this feature's geometry from another QgsGeometry object (deep copy)
156156
*/
157-
void setGeometry(QgsGeometry& geom);
157+
void setGeometry(const QgsGeometry& geom);
158158

159159
/** Set this feature's geometry (takes geometry ownership)
160160
*/

0 commit comments

Comments
 (0)