mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	cleanup: remove get_times() functions
The function 1) was misnamed: it determined the time of the first selcted dive. 2) had only one caller. 3) would crash if there was no selected dive. Let's just fold the functionality into the caller. It's a one-liner anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									464dd93fe8
								
							
						
					
					
						commit
						4aa571d5a0
					
				
					 3 changed files with 5 additions and 17 deletions
				
			
		|  | @ -193,9 +193,11 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton *button) | |||
| 	} | ||||
| 
 | ||||
| 	ui.timeEdit->setTime(QTime(0, 0, 0, 0)); | ||||
| 	when = get_times(); //get time of first selected dive
 | ||||
| 	ui.currentTime->setText(get_dive_date_string(when)); | ||||
| 	ui.shiftedTime->setText(get_dive_date_string(when)); | ||||
| 	dive *d = first_selected_dive(); | ||||
| 	if (d) { | ||||
| 		ui.currentTime->setText(get_dive_date_string(d->when)); | ||||
| 		ui.shiftedTime->setText(get_dive_date_string(d->when)); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void ShiftTimesDialog::changeTime() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue