mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix use of QString
We should use references when we are not wanting to make a copy of it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e7e58bf9ea
								
							
						
					
					
						commit
						01cd09c77a
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -324,7 +324,6 @@ void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsedOrdered) | |||
| { | ||||
| 	int i, j; | ||||
| 	struct dive *d; | ||||
| 	QString gas; | ||||
| 	QMap<QString, int> gasUsed; | ||||
| 	for_each_dive (i, d) { | ||||
| 		if (!d->selected) | ||||
|  | @ -337,7 +336,7 @@ void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsedOrdered) | |||
| 				gasUsed[gasName] += diveGases[j].mliter; | ||||
| 			} | ||||
| 	} | ||||
| 	Q_FOREACH(gas, gasUsed.keys()) { | ||||
| 	Q_FOREACH(const QString& gas, gasUsed.keys()) { | ||||
| 		gasUsedOrdered.append(qMakePair(gas, gasUsed[gas])); | ||||
| 	} | ||||
| 	qSort(gasUsedOrdered.begin(), gasUsedOrdered.end(), lessThan); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue