mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	core/video_core: Don't cast away const in subscript operators
Not to say these subscript operators aren't totally ugly as is.
This commit is contained in:
		
							parent
							
								
									55f24e1cf4
								
							
						
					
					
						commit
						39baad9926
					
				
					 3 changed files with 9 additions and 9 deletions
				
			
		|  | @ -267,13 +267,13 @@ struct Regs { | ||||||
|         return sizeof(Regs) / sizeof(u32); |         return sizeof(Regs) / sizeof(u32); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) const { |     const u32& operator [] (int index) const { | ||||||
|         u32* content = (u32*)this; |         const u32* content = reinterpret_cast<const u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) { |     u32& operator [] (int index) { | ||||||
|         u32* content = (u32*)this; |         u32* content = reinterpret_cast<u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -42,13 +42,13 @@ struct Regs { | ||||||
|         return sizeof(Regs) / sizeof(u32); |         return sizeof(Regs) / sizeof(u32); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) const { |     const u32& operator [] (int index) const { | ||||||
|         u32* content = (u32*)this; |         const u32* content = reinterpret_cast<const u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) { |     u32& operator [] (int index) { | ||||||
|         u32* content = (u32*)this; |         u32* content = reinterpret_cast<u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1225,13 +1225,13 @@ struct Regs { | ||||||
|         return sizeof(Regs) / sizeof(u32); |         return sizeof(Regs) / sizeof(u32); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) const { |     const u32& operator [] (int index) const { | ||||||
|         u32* content = (u32*)this; |         const u32* content = reinterpret_cast<const u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     u32& operator [] (int index) { |     u32& operator [] (int index) { | ||||||
|         u32* content = (u32*)this; |         u32* content = reinterpret_cast<u32*>(this); | ||||||
|         return content[index]; |         return content[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue