Skip to content

Commit f9be179

Browse files
committedNov 21, 2016
make cost() method pure virtual
1 parent 00eb261 commit f9be179

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed
 

‎python/analysis/network/qgsstrategy.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ class QgsStrategy
4646
/**
4747
* Return edge cost
4848
*/
49-
virtual QVariant cost( double distance, const QgsFeature &f ) const;
49+
virtual QVariant cost( double distance, const QgsFeature &f ) const = 0;
5050
};

‎src/analysis/network/qgsstrategy.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ class ANALYSIS_EXPORT QgsStrategy
5151
/**
5252
* Return edge cost
5353
*/
54-
virtual QVariant cost( double distance, const QgsFeature &f ) const
55-
{
56-
Q_UNUSED( distance );
57-
Q_UNUSED( f );
58-
return QVariant();
59-
}
54+
virtual QVariant cost( double distance, const QgsFeature &f ) const = 0;
6055
};
6156

6257
#endif // QGSSTRATERGY_H

0 commit comments

Comments
 (0)
Please sign in to comment.