Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename more members
  • Loading branch information
nyalldawson committed Jul 31, 2021
1 parent 37ffa4c commit 4889494
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions src/providers/gpx/qgsgpxfeatureiterator.cpp
Expand Up @@ -64,11 +64,11 @@ bool QgsGPXFeatureIterator::rewind()
else
{
if ( mSource->mFeatureType == QgsGPXProvider::WaypointType )
mWptIter = mSource->data->waypointsBegin();
mWptIter = mSource->mData->waypointsBegin();
else if ( mSource->mFeatureType == QgsGPXProvider::RouteType )
mRteIter = mSource->data->routesBegin();
mRteIter = mSource->mData->routesBegin();
else if ( mSource->mFeatureType == QgsGPXProvider::TrackType )
mTrkIter = mSource->data->tracksBegin();
mTrkIter = mSource->mData->tracksBegin();
}

return true;
Expand Down Expand Up @@ -105,7 +105,7 @@ bool QgsGPXFeatureIterator::fetchFeature( QgsFeature &feature )
{
// go through the list of waypoints and return the first one that is in
// the bounds rectangle
for ( ; mWptIter != mSource->data->waypointsEnd(); ++mWptIter )
for ( ; mWptIter != mSource->mData->waypointsEnd(); ++mWptIter )
{
if ( readWaypoint( *mWptIter, feature ) )
{
Expand All @@ -119,7 +119,7 @@ bool QgsGPXFeatureIterator::fetchFeature( QgsFeature &feature )
{
// go through the routes and return the first one that is in the bounds
// rectangle
for ( ; mRteIter != mSource->data->routesEnd(); ++mRteIter )
for ( ; mRteIter != mSource->mData->routesEnd(); ++mRteIter )
{
if ( readRoute( *mRteIter, feature ) )
{
Expand All @@ -133,7 +133,7 @@ bool QgsGPXFeatureIterator::fetchFeature( QgsFeature &feature )
{
// go through the tracks and return the first one that is in the bounds
// rectangle
for ( ; mTrkIter != mSource->data->tracksEnd(); ++mTrkIter )
for ( ; mTrkIter != mSource->mData->tracksEnd(); ++mTrkIter )
{
if ( readTrack( *mTrkIter, feature ) )
{
Expand All @@ -159,7 +159,7 @@ bool QgsGPXFeatureIterator::readFid( QgsFeature &feature )

if ( mSource->mFeatureType == QgsGPXProvider::WaypointType )
{
for ( QgsGpsData::WaypointIterator it = mSource->data->waypointsBegin() ; it != mSource->data->waypointsEnd(); ++it )
for ( QgsGpsData::WaypointIterator it = mSource->mData->waypointsBegin() ; it != mSource->mData->waypointsEnd(); ++it )
{
if ( it->id == fid )
{
Expand All @@ -170,7 +170,7 @@ bool QgsGPXFeatureIterator::readFid( QgsFeature &feature )
}
else if ( mSource->mFeatureType == QgsGPXProvider::RouteType )
{
for ( QgsGpsData::RouteIterator it = mSource->data->routesBegin() ; it != mSource->data->routesEnd(); ++it )
for ( QgsGpsData::RouteIterator it = mSource->mData->routesBegin() ; it != mSource->mData->routesEnd(); ++it )
{
if ( it->id == fid )
{
Expand All @@ -181,7 +181,7 @@ bool QgsGPXFeatureIterator::readFid( QgsFeature &feature )
}
else if ( mSource->mFeatureType == QgsGPXProvider::TrackType )
{
for ( QgsGpsData::TrackIterator it = mSource->data->tracksBegin() ; it != mSource->data->tracksEnd(); ++it )
for ( QgsGpsData::TrackIterator it = mSource->mData->tracksBegin() ; it != mSource->mData->tracksEnd(); ++it )
{
if ( it->id == fid )
{
Expand Down Expand Up @@ -311,7 +311,7 @@ void QgsGPXFeatureIterator::readAttributes( QgsFeature &feature, const QgsWaypoi
// add attributes if they are wanted
for ( int i = 0; i < mSource->mFields.count(); ++i )
{
switch ( mSource->indexToAttr.at( i ) )
switch ( mSource->mIndexToAttr.at( i ) )
{
case QgsGPXProvider::NameAttr:
feature.setAttribute( i, QVariant( wpt.name ) );
Expand Down Expand Up @@ -347,7 +347,7 @@ void QgsGPXFeatureIterator::readAttributes( QgsFeature &feature, const QgsRoute
// add attributes if they are wanted
for ( int i = 0; i < mSource->mFields.count(); ++i )
{
switch ( mSource->indexToAttr.at( i ) )
switch ( mSource->mIndexToAttr.at( i ) )
{
case QgsGPXProvider::NameAttr:
feature.setAttribute( i, QVariant( rte.name ) );
Expand Down Expand Up @@ -381,7 +381,7 @@ void QgsGPXFeatureIterator::readAttributes( QgsFeature &feature, const QgsTrack
// add attributes if they are wanted
for ( int i = 0; i < mSource->mFields.count(); ++i )
{
switch ( mSource->indexToAttr.at( i ) )
switch ( mSource->mIndexToAttr.at( i ) )
{
case QgsGPXProvider::NameAttr:
feature.setAttribute( i, QVariant( trk.name ) );
Expand Down Expand Up @@ -497,11 +497,11 @@ QgsGeometry *QgsGPXFeatureIterator::readTrackGeometry( const QgsTrack &trk )
QgsGPXFeatureSource::QgsGPXFeatureSource( const QgsGPXProvider *p )
: mFileName( p->mFileName )
, mFeatureType( p->mFeatureType )
, indexToAttr( p->mIndexToAttr )
, mIndexToAttr( p->mIndexToAttr )
, mFields( p->mAttributeFields )
, mCrs( p->crs() )
{
data = QgsGpsData::getData( mFileName );
mData = QgsGpsData::getData( mFileName );
}

QgsGPXFeatureSource::~QgsGPXFeatureSource()
Expand Down
4 changes: 2 additions & 2 deletions src/providers/gpx/qgsgpxfeatureiterator.h
Expand Up @@ -34,8 +34,8 @@ class QgsGPXFeatureSource final: public QgsAbstractFeatureSource
private:
QString mFileName;
QgsGPXProvider::DataType mFeatureType;
QgsGpsData *data = nullptr;
QVector<int> indexToAttr;
QgsGpsData *mData = nullptr;
QVector<int> mIndexToAttr;
QgsFields mFields;
QgsCoordinateReferenceSystem mCrs;

Expand Down

0 comments on commit 4889494

Please sign in to comment.