Skip to content

Commit

Permalink
only allow const access to gpx lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 committed Nov 18, 2024
1 parent c668ebf commit 7fc03b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gui/gmapdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class GMapDialog: public QDialog
GMapDialog(QWidget* parent, const Gpx& mapData, QPlainTextEdit* te);

private:
static constexpr bool debug_ = true;
static constexpr bool debug_ = false;

Ui_GMapDlg ui_;
Map* mapWidget_;
Expand Down
21 changes: 3 additions & 18 deletions gui/gpx.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,32 +345,17 @@ class Gpx
public:
QString read(const QString& fileName);

QList <GpxWaypoint>& getWaypoints()
{
return wayPoints;
} // nonconst

QList <GpxTrack>& getTracks()
{
return tracks;
}

QList <GpxRoute>& getRoutes()
{
return routes;
}

const QList <GpxWaypoint>& getWaypoints() const
const QList<GpxWaypoint>& getWaypoints() const
{
return wayPoints;
}

const QList <GpxTrack>& getTracks() const
const QList<GpxTrack>& getTracks() const
{
return tracks;
}

const QList <GpxRoute>& getRoutes() const
const QList<GpxRoute>& getRoutes() const
{
return routes;
}
Expand Down

0 comments on commit 7fc03b3

Please sign in to comment.