mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Common: Add a clone of std::make_unique
This commit is contained in:
		
							parent
							
								
									f1309e6bf0
								
							
						
					
					
						commit
						82528ba7df
					
				
					 5 changed files with 31 additions and 10 deletions
				
			
		|  | @ -49,6 +49,7 @@ set(HEADERS | |||
|             logging/filter.h | ||||
|             logging/log.h | ||||
|             logging/backend.h | ||||
|             make_unique.h | ||||
|             math_util.h | ||||
|             mem_arena.h | ||||
|             memory_util.h | ||||
|  |  | |||
							
								
								
									
										16
									
								
								src/common/make_unique.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/common/make_unique.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| // Copyright 2014 Citra Emulator Project
 | ||||
| // Licensed under GPLv2 or any later version
 | ||||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| #include <memory> | ||||
| 
 | ||||
| namespace Common { | ||||
| 
 | ||||
| template <typename T, typename... Args> | ||||
| std::unique_ptr<T> make_unique(Args&&... args) { | ||||
|     return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); | ||||
| } | ||||
| 
 | ||||
| } // namespace
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue