Skip to content

Commit

Permalink
clang tidy readability-convert-member-functions-to-static
Browse files Browse the repository at this point in the history
manually removed now unnecessary Functors.
  • Loading branch information
tsteven4 committed Jul 17, 2022
1 parent feb91e1 commit 5b183b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions swapdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ void SwapDataFilter::swapdata_cb(const Waypoint* ref)

void SwapDataFilter::process() /* this procedure must be present in vecs */
{
WayptFunctor<SwapDataFilter> swapdata_cb_f(this, &SwapDataFilter::swapdata_cb);

waypt_disp_all(swapdata_cb_f);
route_disp_all(nullptr, nullptr, swapdata_cb_f);
track_disp_all(nullptr, nullptr, swapdata_cb_f);
waypt_disp_all(swapdata_cb);
route_disp_all(nullptr, nullptr, swapdata_cb);
track_disp_all(nullptr, nullptr, swapdata_cb);
}

#endif // FILTERS_ENABLED
2 changes: 1 addition & 1 deletion swapdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SwapDataFilter:public Filter
QVector<arglist_t> args = {
};

void swapdata_cb(const Waypoint* ref);
static void swapdata_cb(const Waypoint* ref);

};

Expand Down
3 changes: 1 addition & 2 deletions trackfilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ void TrackFilter::trackfilter_segment_head(const route_head* rte)

void TrackFilter::init()
{
RteHdFunctor<TrackFilter> trackfilter_segment_head_f(this, &TrackFilter::trackfilter_segment_head);
RteHdFunctor<TrackFilter> trackfilter_fill_track_list_cb_f(this, &TrackFilter::trackfilter_fill_track_list_cb);

/*
Expand All @@ -972,7 +971,7 @@ void TrackFilter::init()

// Perform segmenting first.
if (opt_segment) {
track_disp_all(trackfilter_segment_head_f, nullptr, nullptr);
track_disp_all(trackfilter_segment_head, nullptr, nullptr);
}

track_list.clear();
Expand Down
2 changes: 1 addition & 1 deletion trackfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class TrackFilter:public Filter
void trackfilter_faketime(); /* returns number of track points left after filtering */
static bool trackfilter_points_are_same(const Waypoint* wpta, const Waypoint* wptb);

void trackfilter_segment_head(const route_head* rte);
static void trackfilter_segment_head(const route_head* rte);

};

Expand Down

0 comments on commit 5b183b6

Please sign in to comment.