mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Cleanup: small coding style fixes
And addressing a cut and paste error in a comment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									1bdf00b2b4
								
							
						
					
					
						commit
						2feedf46fa
					
				
					 8 changed files with 13 additions and 17 deletions
				
			
		|  | @ -65,9 +65,9 @@ static char *to_utf8(unsigned char *in_string) | |||
| 
 | ||||
| 	char *out_string = calloc(outlen, 1); | ||||
| 	for (i = 0; i < inlen; i++) { | ||||
| 		if (in_string[i] < 127) | ||||
| 		if (in_string[i] < 127) { | ||||
| 			out_string[j] = in_string[i]; | ||||
| 		else { | ||||
| 		} else { | ||||
| 			if (in_string[i] > 127 && in_string[i] <= 173) | ||||
| 				in_string[i] = to_8859(in_string[i]); | ||||
| 			out_string[j] = (in_string[i] >> 6) | 0xC0; | ||||
|  |  | |||
|  | @ -461,8 +461,7 @@ void calc_crushing_pressure(struct deco_state *ds, double pressure) | |||
| 		if (gradient <= vpmb_config.gradient_of_imperm) {	// permeable situation
 | ||||
| 			n2_crushing_pressure = he_crushing_pressure = gradient; | ||||
| 			ds->crushing_onset_tension[ci] = gas_tension; | ||||
| 		} | ||||
| 		else {	// impermeable
 | ||||
| 		} else {	// impermeable
 | ||||
| 			if (ds->max_ambient_pressure >= pressure) | ||||
| 				return; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1340,7 +1340,7 @@ static void fixup_surface_pressure(struct dive *dive) | |||
| 
 | ||||
| /* if the surface pressure in the dive data is redundant to the calculated
 | ||||
|  * value (i.e., it was added by running fixup on the dive) return 0, | ||||
|  * otherwise return the air temperature given in the dive */ | ||||
|  * otherwise return the surface pressure given in the dive */ | ||||
| pressure_t un_fixup_surface_pressure(const struct dive *d) | ||||
| { | ||||
| 	pressure_t res = d->surface_pressure; | ||||
|  |  | |||
|  | @ -582,8 +582,7 @@ int init_decompression(struct deco_state *ds, struct dive *dive) | |||
| 			printf("Tissues after init:\n"); | ||||
| 			dump_tissues(ds); | ||||
| #endif | ||||
| 		} | ||||
| 		else { | ||||
| 		} else { | ||||
| 			surface_time = pdive->when - last_endtime; | ||||
| 			if (surface_time < 0) { | ||||
| #if DECO_CALC_DEBUG & 2 | ||||
|  | @ -620,8 +619,7 @@ int init_decompression(struct deco_state *ds, struct dive *dive) | |||
| 		printf("Tissues after no previous dive, surface time set to 48h:\n"); | ||||
| 		dump_tissues(ds); | ||||
| #endif | ||||
| 	} | ||||
| 	else { | ||||
| 	} else { | ||||
| 		surface_time = dive->when - last_endtime; | ||||
| 		if (surface_time < 0) { | ||||
| #if DECO_CALC_DEBUG & 2 | ||||
|  |  | |||
|  | @ -100,9 +100,9 @@ void Printer::flowRender() | |||
| 			emit(progessUpdated(lrint((end * 80.0 / fullPageResolution) + done))); | ||||
| 
 | ||||
| 			// add new pages only in print mode, while previewing we don't add new pages
 | ||||
| 			if (printMode == Printer::PRINT) | ||||
| 			if (printMode == Printer::PRINT) { | ||||
| 				static_cast<QPrinter*>(paintDevice)->newPage(); | ||||
| 			else { | ||||
| 			} else { | ||||
| 				painter.end(); | ||||
| 				return; | ||||
| 			} | ||||
|  |  | |||
|  | @ -376,9 +376,9 @@ void ShiftImageTimesDialog::updateInvalid() | |||
| 	ui.invalidFilesText->hide(); | ||||
| 	QDateTime time_first = QDateTime::fromTime_t(first_selected_dive()->when, Qt::UTC); | ||||
| 	QDateTime time_last = QDateTime::fromTime_t(last_selected_dive()->when, Qt::UTC); | ||||
| 	if (first_selected_dive() == last_selected_dive()) | ||||
| 	if (first_selected_dive() == last_selected_dive()) { | ||||
| 		ui.invalidFilesText->setPlainText(tr("Selected dive date/time") + ": " + time_first.toString()); | ||||
| 	else { | ||||
| 	} else { | ||||
| 		ui.invalidFilesText->setPlainText(tr("First selected dive date/time") + ": " + time_first.toString()); | ||||
| 		ui.invalidFilesText->append(tr("Last selected dive date/time") + ": " + time_last.toString()); | ||||
| 	} | ||||
|  |  | |||
|  | @ -86,8 +86,7 @@ void TabDiveInformation::updateProfile() | |||
| 
 | ||||
| 	if (current_dive->surface_pressure.mbar == 0) { | ||||
| 		ui->atmPressVal->clear();			// If no atm pressure for dive then clear text box
 | ||||
| 	} | ||||
| 	else { | ||||
| 	} else { | ||||
| 
 | ||||
| 		ui->atmPressVal->setEnabled(true); | ||||
| 		QString pressStr; | ||||
|  |  | |||
|  | @ -89,8 +89,8 @@ static int countPhotos(const struct dive *d) | |||
| 		pic_offset = picture->offset.seconds; | ||||
| 		if  ((pic_offset < -bufperiod) | (pic_offset > diveTotaltime+bufperiod)) { | ||||
| 			icon_index |= 0x02;	// If picture is before/after the dive
 | ||||
| 		}				//  then set the appropriate bit ...
 | ||||
| 		else { | ||||
| 						//  then set the appropriate bit ...
 | ||||
| 		} else { | ||||
| 			icon_index |= 0x01;	// else set the bit for picture during the dive
 | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue