mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
This commit is contained in:
		
							parent
							
								
									f7aaa37bf2
								
							
						
					
					
						commit
						8ce81b19be
					
				
					 10 changed files with 35 additions and 29 deletions
				
			
		|  | @ -373,7 +373,7 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget( | |||
|     auto input_data_mapper = new QSignalMapper(this); | ||||
| 
 | ||||
|     // TODO: Support inputting data in hexadecimal raw format
 | ||||
|     for (unsigned i = 0; i < ARRAY_SIZE(input_data); ++i) { | ||||
|     for (std::size_t i = 0; i < input_data.size(); ++i) { | ||||
|         input_data[i] = new QLineEdit; | ||||
|         input_data[i]->setValidator(new QDoubleValidator(input_data[i])); | ||||
|     } | ||||
|  | @ -401,7 +401,7 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget( | |||
|     connect(cycle_index, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, | ||||
|             &GraphicsVertexShaderWidget::OnCycleIndexChanged); | ||||
| 
 | ||||
|     for (unsigned i = 0; i < ARRAY_SIZE(input_data); ++i) { | ||||
|     for (u32 i = 0; i < input_data.size(); ++i) { | ||||
|         connect(input_data[i], &QLineEdit::textEdited, input_data_mapper, | ||||
|                 static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map)); | ||||
|         input_data_mapper->setMapping(input_data[i], i); | ||||
|  |  | |||
|  | @ -67,13 +67,14 @@ private: | |||
|     QTreeView* binary_list; | ||||
|     GraphicsVertexShaderModel* model; | ||||
| 
 | ||||
|     /// TODO: Move these into a single struct
 | ||||
|     std::array<QLineEdit*, 4 * 16> | ||||
|         input_data; // A text box for each of the 4 components of up to 16 vertex attributes
 | ||||
|     std::array<QWidget*, 16> | ||||
|         input_data_container; // QWidget containing the QLayout containing each vertex attribute
 | ||||
|     std::array<QLabel*, 16> input_data_mapping; // A QLabel denoting the shader input attribute
 | ||||
|                                                 // which the vertex attribute maps to
 | ||||
|     // TODO: Move these into a single struct
 | ||||
| 
 | ||||
|     // A text box for each of the 4 components of up to 16 vertex attributes
 | ||||
|     std::array<QLineEdit*, 4 * 16> input_data; | ||||
|     // QWidget containing the QLayout containing each vertex attribute
 | ||||
|     std::array<QWidget*, 16> input_data_container; | ||||
|     // A QLabel denoting the shader input attribute which the vertex attribute maps to
 | ||||
|     std::array<QLabel*, 16> input_data_mapping; | ||||
| 
 | ||||
|     // Text to be shown when input vertex data is not retrievable
 | ||||
|     QLabel* breakpoint_warning; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue