mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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@hohndel.org>
This commit is contained in:
		
							parent
							
								
									42afb4972a
								
							
						
					
					
						commit
						9edb7811ef
					
				
					 2 changed files with 2 additions and 9 deletions
				
			
		
							
								
								
									
										7
									
								
								dive.h
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								dive.h
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -494,13 +494,6 @@ extern unsigned int dc_number;
 | 
			
		|||
#define current_dive (get_dive(selected_dive))
 | 
			
		||||
#define current_dc (get_dive_dc(current_dive, dc_number))
 | 
			
		||||
 | 
			
		||||
static inline struct dive *get_gps_location(int nr, struct dive_table *table)
 | 
			
		||||
{
 | 
			
		||||
	if (nr >= table->nr || nr < 0)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	return table->dives[nr];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static inline struct dive *get_dive(int nr)
 | 
			
		||||
{
 | 
			
		||||
	if (nr >= dive_table.nr || nr < 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ static bool merge_locations_into_dives(void)
 | 
			
		|||
 | 
			
		||||
	for_each_dive (i, dive) {
 | 
			
		||||
		if (!dive_has_gps_location(dive)) {
 | 
			
		||||
			for (j = tracer; (gpsfix = get_gps_location(j, &gps_location_table)) !=NULL; j++) {
 | 
			
		||||
			for (j = tracer; (gpsfix = get_dive_from_table(j, &gps_location_table)) !=NULL; j++) {
 | 
			
		||||
				if (dive_within_time_range (dive, gpsfix->when, SAME_GROUP)) {
 | 
			
		||||
					/*
 | 
			
		||||
					 * If position is fixed during dive. This is the good one.
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +57,7 @@ static bool merge_locations_into_dives(void)
 | 
			
		|||
						/*
 | 
			
		||||
						 * If it is not, check if there are more position fixes in SAME_GROUP range
 | 
			
		||||
						 */
 | 
			
		||||
						if ((nextgpsfix = get_gps_location(j+1,&gps_location_table)) &&
 | 
			
		||||
						if ((nextgpsfix = get_dive_from_table(j+1,&gps_location_table)) &&
 | 
			
		||||
						    dive_within_time_range (dive, nextgpsfix->when, SAME_GROUP)) {
 | 
			
		||||
							/*
 | 
			
		||||
							 * If distance from gpsfix to end of dive is shorter than distance between
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue