Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy authored and 3nids committed May 4, 2017
1 parent 433b21f commit b295fcc
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/analysis/network/qgsgraphanalyzer.h
Expand Up @@ -41,34 +41,34 @@ class ANALYSIS_EXPORT QgsGraphAnalyzer
static SIP_PYLIST void dijkstra( const QgsGraph *source, int startVertexIdx, int criterionNum, QVector<int> *resultTree = nullptr, QVector<double> *resultCost = nullptr );

#ifdef SIP_RUN
% MethodCode
QVector< int > treeResult;
QVector< double > costResult;
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );
% MethodCode
QVector< int > treeResult;
QVector< double > costResult;
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );

PyObject *l1 = PyList_New( treeResult.size() );
if ( l1 == NULL )
{
return NULL;
}
PyObject *l2 = PyList_New( costResult.size() );
if ( l2 == NULL )
{
return NULL;
}
int i;
for ( i = 0; i < costResult.size(); ++i )
{
PyObject *Int = PyLong_FromLong( treeResult[i] );
PyList_SET_ITEM( l1, i, Int );
PyObject *Float = PyFloat_FromDouble( costResult[i] );
PyList_SET_ITEM( l2, i, Float );
}
PyObject *l1 = PyList_New( treeResult.size() );
if ( l1 == NULL )
{
return NULL;
}
PyObject *l2 = PyList_New( costResult.size() );
if ( l2 == NULL )
{
return NULL;
}
int i;
for ( i = 0; i < costResult.size(); ++i )
{
PyObject *Int = PyLong_FromLong( treeResult[i] );
PyList_SET_ITEM( l1, i, Int );
PyObject *Float = PyFloat_FromDouble( costResult[i] );
PyList_SET_ITEM( l2, i, Float );
}

sipRes = PyTuple_New( 2 );
PyTuple_SET_ITEM( sipRes, 0, l1 );
PyTuple_SET_ITEM( sipRes, 1, l2 );
% End
sipRes = PyTuple_New( 2 );
PyTuple_SET_ITEM( sipRes, 0, l1 );
PyTuple_SET_ITEM( sipRes, 1, l2 );
% End
#endif

/**
Expand Down

0 comments on commit b295fcc

Please sign in to comment.