Skip to content

Commit

Permalink
Fix clazy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 12, 2021
1 parent 0f49cb9 commit cf43c60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsrelation.sip.in
Expand Up @@ -321,7 +321,7 @@ Will be called internally whenever a member is changed.
.. versionadded:: 3.6
%End

void setPolymorphicRelationId( const QString polymorphicRelationId );
void setPolymorphicRelationId( const QString &polymorphicRelationId );
%Docstring
Sets the parent polymorphic relation id.

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsrelation.cpp
Expand Up @@ -317,7 +317,7 @@ QList<QgsRelation::FieldPair> QgsRelation::fieldPairs() const
QgsAttributeList QgsRelation::referencedFields() const
{
QgsAttributeList attrs;

attrs.reserve( d->mFieldPairs.size() );
for ( const FieldPair &pair : qgis::as_const( d->mFieldPairs ) )
{
attrs << d->mReferencedLayer->fields().lookupField( pair.second );
Expand Down Expand Up @@ -421,7 +421,7 @@ void QgsRelation::updateRelationStatus()
}
}

void QgsRelation::setPolymorphicRelationId( const QString polymorphicRelationId )
void QgsRelation::setPolymorphicRelationId( const QString &polymorphicRelationId )
{
d.detach();
d->mPolymorphicRelationId = polymorphicRelationId;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrelation.h
Expand Up @@ -398,7 +398,7 @@ class CORE_EXPORT QgsRelation
* Sets the parent polymorphic relation id.
* \since QGIS 3.18
*/
void setPolymorphicRelationId( const QString polymorphicRelationId );
void setPolymorphicRelationId( const QString &polymorphicRelationId );

/**
* Returns the parent polymorphic relation id. If the relation is a normal relation, a null string is returned.
Expand Down

0 comments on commit cf43c60

Please sign in to comment.