Skip to content
Permalink
Browse files

fix windows build

  • Loading branch information
jef-n committed Oct 2, 2011
1 parent b8305a7 commit b379671a328335e500efc33824d8ce09e9e8dbee
@@ -63,9 +63,9 @@ void QgsGraphAnalyzer::shortestpath( const QgsGraph* source, int startPointIdx,
const QgsGraphArc& arc = source->arc( *arcIt );
double cost = arc.property( criterionNum ).toDouble() + curCost;

if ( cost < result[ arc.inVertex() ].first )
if ( cost < result[ arc.inVertex()].first )
{
result[ arc.inVertex() ] = QPair< double, int >( cost, *arcIt );
result[ arc.inVertex()] = QPair< double, int >( cost, *arcIt );
not_begin.insert( cost, arc.inVertex() );
}
}
@@ -90,7 +90,7 @@ void QgsGraphAnalyzer::shortestpath( const QgsGraph* source, int startPointIdx,
{
const QgsGraphArc& arc = source->arc( result[i].second );

treeResult->addArc( source2result[ arc.outVertex() ], source2result[ i ],
treeResult->addArc( source2result[ arc.outVertex()], source2result[ i ],
arc.properties() );
}
}
@@ -83,7 +83,11 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* @param pt vertex coordinate
* @note id and pt are redundant. You can use pt or id to identify the vertex
*/
virtual void addVertex( int id, const QgsPoint &pt ) = 0;
virtual void addVertex( int id, const QgsPoint &pt )
{
Q_UNUSED( id );
Q_UNUSED( pt );
}

/**
* add arc
@@ -94,7 +98,14 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* @param properties arc properties
* @note pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.
*/
virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& properties ) = 0;
virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& properties )
{
Q_UNUSED( pt1id );
Q_UNUSED( pt1 );
Q_UNUSED( pt2id );
Q_UNUSED( pt2 );
Q_UNUSED( properties );
}

private:
QgsCoordinateReferenceSystem mCrs;
@@ -31,7 +31,7 @@ class QgsVectorLayer;
* \class QgsLineVectorLayerDirector
* \brief Determine making the graph from vector line layer
*/
class QgsLineVectorLayerDirector : public QgsGraphDirector
class ANALYSIS_EXPORT QgsLineVectorLayerDirector : public QgsGraphDirector
{
public:
/**
@@ -77,7 +77,6 @@ class RoadGraphPlugin: public QObject, public QgisPlugin
double topologyToleranceFactor();

public slots:
void render( QPainter *painter );
//! init the gui
virtual void initGui();

@@ -371,11 +371,11 @@ void RgShortestPathWidget::exportPath()
return;

QgsCoordinateTransform ct( mPlugin->iface()->mapCanvas()->mapRenderer()->destinationCrs(),
vl->crs() );
vl->crs() );

int startVertexIdx = path.findVertex( p1 );
int stopVertexIdx = path.findVertex( p2 );

QgsPolyline p;
while ( startVertexIdx != stopVertexIdx )
{

0 comments on commit b379671

Please sign in to comment.
You can’t perform that action at this time.