mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	core/memory: Make use of std::move in Entry::operator= (#5233)
* core/memory: Amend unusual return value of operator= operator= usually returns a reference to this. Given there's no comment explaining why void was used, this can be assumed to be an oversight. * core/memory: Make use of std::move in Entry::operator= Same behavior, minus the need for an atomic reference count increment and decrement (since MemoryRef contains a std::shared_ptr).
This commit is contained in:
		
							parent
							
								
									9dc0f38ffd
								
							
						
					
					
						commit
						96832a2c82
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -85,9 +85,10 @@ struct PageTable { | ||||||
|         struct Entry { |         struct Entry { | ||||||
|             Entry(Pointers& pointers_, VAddr idx_) : pointers(pointers_), idx(idx_) {} |             Entry(Pointers& pointers_, VAddr idx_) : pointers(pointers_), idx(idx_) {} | ||||||
| 
 | 
 | ||||||
|             void operator=(MemoryRef value) { |             Entry& operator=(MemoryRef value) { | ||||||
|                 pointers.refs[idx] = value; |  | ||||||
|                 pointers.raw[idx] = value.GetPtr(); |                 pointers.raw[idx] = value.GetPtr(); | ||||||
|  |                 pointers.refs[idx] = std::move(value); | ||||||
|  |                 return *this; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             operator u8*() { |             operator u8*() { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue