Changeset 9edb7811 in subsurface


Ignore:
Timestamp:
Feb 11, 2015, 4:34:02 PM (3 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.5-branch
Children:
dcfda29
Parents:
42afb49
git-author:
Dirk Hohndel <dirk@…> (02/11/15 10:33:36)
git-committer:
Dirk Hohndel <dirk@…> (02/11/15 16:34:02)
Message:

Remove redundant function

We had two functions doing exactly the same thing. Let's drop the one with
the highly confusing name.

Signed-off-by: Dirk Hohndel <dirk@…>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dive.h

    r585d6a0 r9edb7811  
    495495#define current_dc (get_dive_dc(current_dive, dc_number))
    496496
    497 static inline struct dive *get_gps_location(int nr, struct dive_table *table)
    498 {
    499         if (nr >= table->nr || nr < 0)
    500                 return NULL;
    501         return table->dives[nr];
    502 }
    503 
    504497static inline struct dive *get_dive(int nr)
    505498{
  • qt-ui/subsurfacewebservices.cpp

    r6b038c2 r9edb7811  
    4343        for_each_dive (i, dive) {
    4444                if (!dive_has_gps_location(dive)) {
    45                         for (j = tracer; (gpsfix = get_gps_location(j, &gps_location_table)) !=NULL; j++) {
     45                        for (j = tracer; (gpsfix = get_dive_from_table(j, &gps_location_table)) !=NULL; j++) {
    4646                                if (dive_within_time_range (dive, gpsfix->when, SAME_GROUP)) {
    4747                                        /*
     
    5858                                                 * If it is not, check if there are more position fixes in SAME_GROUP range
    5959                                                 */
    60                                                 if ((nextgpsfix = get_gps_location(j+1,&gps_location_table)) &&
     60                                                if ((nextgpsfix = get_dive_from_table(j+1,&gps_location_table)) &&
    6161                                                    dive_within_time_range (dive, nextgpsfix->when, SAME_GROUP)) {
    6262                                                        /*
Note: See TracChangeset for help on using the changeset viewer.