Skip to content

Commit cee539a

Browse files
committed
Add missing const to equality operator
1 parent 3a64b44 commit cee539a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

python/core/qgsdatadefined.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class QgsDataDefined
7676
*/
7777
bool setFromXmlElement( const QDomElement& element );
7878

79-
bool operator==( const QgsDataDefined &other );
80-
bool operator!=( const QgsDataDefined &other );
79+
bool operator==( const QgsDataDefined &other ) const;
80+
bool operator!=( const QgsDataDefined &other ) const;
8181

8282
};

src/core/qgsdatadefined.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ bool QgsDataDefined::setFromXmlElement( const QDomElement &element )
161161
return true;
162162
}
163163

164-
bool QgsDataDefined::operator==( const QgsDataDefined &other )
164+
bool QgsDataDefined::operator==( const QgsDataDefined &other ) const
165165
{
166166
return other.isActive() == mActive && other.useExpression() == mUseExpression &&
167167
other.field() == mField && other.expressionString() == mExpressionString;
168168
}
169169

170-
bool QgsDataDefined::operator!=( const QgsDataDefined &other )
170+
bool QgsDataDefined::operator!=( const QgsDataDefined &other ) const
171171
{
172172
return !( *this == other );
173173
}

src/core/qgsdatadefined.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ class CORE_EXPORT QgsDataDefined
9898
*/
9999
bool setFromXmlElement( const QDomElement& element );
100100

101-
bool operator==( const QgsDataDefined &other );
102-
bool operator!=( const QgsDataDefined &other );
101+
bool operator==( const QgsDataDefined &other ) const;
102+
bool operator!=( const QgsDataDefined &other ) const;
103103

104104
private:
105105
QgsExpression* mExpression;

0 commit comments

Comments
 (0)