mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	code cleanup: allocate the vector in one go
The << alternative can reallocate the vector, but we know it's size, so preallocate. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									858740e8a1
								
							
						
					
					
						commit
						6d552d61b9
					
				
					 1 changed files with 9 additions and 9 deletions
				
			
		|  | @ -142,15 +142,15 @@ MainWindow::MainWindow() : QMainWindow(), | |||
| 	// what is a sane order for those icons? we should have the ones the user is
 | ||||
| 	// most likely to want towards the top so they are always visible
 | ||||
| 	// and the ones that someone likely sets and then never touches again towards the bottom
 | ||||
| 	profileToolbarActions << ui.profCalcCeiling << ui.profCalcAllTissues << // start with various ceilings
 | ||||
| 				 ui.profIncrement3m << ui.profDcCeiling << | ||||
| 				 ui.profPhe << ui.profPn2 << ui.profPO2 << // partial pressure graphs
 | ||||
| 				 ui.profRuler << ui.profScaled << // measuring and scaling
 | ||||
| 				 ui.profTogglePicture << ui.profTankbar << | ||||
| 				 ui.profMod << ui.profNdl_tts << // various values that a user is either interested in or not
 | ||||
| 				 ui.profEad << ui.profSAC << | ||||
| 				 ui.profHR << // very few dive computers support this
 | ||||
| 				 ui.profTissues; // maybe less frequently used
 | ||||
| 	profileToolbarActions = { ui.profCalcCeiling, ui.profCalcAllTissues, // start with various ceilings
 | ||||
| 				ui.profIncrement3m, ui.profDcCeiling, | ||||
| 				ui.profPhe, ui.profPn2, ui.profPO2, // partial pressure graphs
 | ||||
| 				ui.profRuler, ui.profScaled, // measuring and scaling
 | ||||
| 				ui.profTogglePicture, ui.profTankbar, | ||||
| 				ui.profMod, ui.profNdl_tts, // various values that a user is either interested in or not
 | ||||
| 				ui.profEad, ui.profSAC, | ||||
| 				ui.profHR, // very few dive computers support this
 | ||||
| 				ui.profTissues}; // maybe less frequently used
 | ||||
| 
 | ||||
| 	QToolBar *toolBar = new QToolBar(); | ||||
| 	Q_FOREACH (QAction *a, profileToolbarActions) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue