mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	cleanup: don't allocate device_data_t structure
These can all just be local objects. Also, don't overwrite them with 0. We later want to convert the string to std::string, where this would be very sketchy. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									b74703b61d
								
							
						
					
					
						commit
						0915c1ce43
					
				
					 4 changed files with 32 additions and 37 deletions
				
			
		| 
						 | 
				
			
			@ -145,7 +145,6 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(const QString &filename
 | 
			
		|||
	ui.connectBluetoothButton->setVisible(false);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	memset(&device_data, 0, sizeof(device_data));
 | 
			
		||||
	fill_computer_list();
 | 
			
		||||
 | 
			
		||||
	unsigned int selectedDiveComputerIndex = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -267,7 +266,7 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(const QString &filename
 | 
			
		|||
OstcFirmwareCheck::OstcFirmwareCheck(const QString &product) : parent(0)
 | 
			
		||||
{
 | 
			
		||||
	QUrl url;
 | 
			
		||||
	memset(&devData, 1, sizeof(devData));
 | 
			
		||||
	devData = device_data_t();
 | 
			
		||||
	if (product == "OSTC 3" || product == "OSTC 3+" || product == "OSTC cR" || product == "OSTC Plus") {
 | 
			
		||||
		url = QUrl("http://www.heinrichsweikamp.net/autofirmware/ostc3_changelog.txt");
 | 
			
		||||
		latestFirmwareHexFile = QString("http://www.heinrichsweikamp.net/autofirmware/ostc3_firmware.hex");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue