Skip to content

Commit

Permalink
make cost() method pure virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 21, 2016
1 parent 00eb261 commit f9be179
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/analysis/network/qgsstrategy.sip
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ class QgsStrategy
/**
* Return edge cost
*/
virtual QVariant cost( double distance, const QgsFeature &f ) const;
virtual QVariant cost( double distance, const QgsFeature &f ) const = 0;
};
7 changes: 1 addition & 6 deletions src/analysis/network/qgsstrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ class ANALYSIS_EXPORT QgsStrategy
/**
* Return edge cost
*/
virtual QVariant cost( double distance, const QgsFeature &f ) const
{
Q_UNUSED( distance );
Q_UNUSED( f );
return QVariant();
}
virtual QVariant cost( double distance, const QgsFeature &f ) const = 0;
};

#endif // QGSSTRATERGY_H

0 comments on commit f9be179

Please sign in to comment.