Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix windows build
  • Loading branch information
jef-n committed Oct 2, 2011
1 parent b8305a7 commit b379671
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/analysis/network/qgsgraphanalyzer.cpp 100644 → 100755
Expand Up @@ -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() );
}
}
Expand All @@ -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() );
}
}
Expand Down
15 changes: 13 additions & 2 deletions src/analysis/network/qgsgraphbuilderintr.h 100644 → 100755
Expand Up @@ -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
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/network/qgslinevectorlayerdirector.h
Expand Up @@ -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:
/**
Expand Down
1 change: 0 additions & 1 deletion src/plugins/roadgraph/roadgraphplugin.h
Expand Up @@ -77,7 +77,6 @@ class RoadGraphPlugin: public QObject, public QgisPlugin
double topologyToleranceFactor();

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

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/roadgraph/shortestpathwidget.cpp 100644 → 100755
Expand Up @@ -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 )
{
Expand Down

0 comments on commit b379671

Please sign in to comment.