mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	 b91c49364d
			
		
	
	
		b91c49364d
		
	
	
	
	
		
			
			This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			758 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			758 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <Kernel/FileSystem/Inode.h>
 | |
| #include <Kernel/VM/PrivateInodeVMObject.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| NonnullRefPtr<PrivateInodeVMObject> PrivateInodeVMObject::create_with_inode(Inode& inode)
 | |
| {
 | |
|     return adopt_ref(*new PrivateInodeVMObject(inode, inode.size()));
 | |
| }
 | |
| 
 | |
| RefPtr<VMObject> PrivateInodeVMObject::clone()
 | |
| {
 | |
|     return adopt_ref(*new PrivateInodeVMObject(*this));
 | |
| }
 | |
| 
 | |
| PrivateInodeVMObject::PrivateInodeVMObject(Inode& inode, size_t size)
 | |
|     : InodeVMObject(inode, size)
 | |
| {
 | |
| }
 | |
| 
 | |
| PrivateInodeVMObject::PrivateInodeVMObject(const PrivateInodeVMObject& other)
 | |
|     : InodeVMObject(other)
 | |
| {
 | |
| }
 | |
| 
 | |
| PrivateInodeVMObject::~PrivateInodeVMObject()
 | |
| {
 | |
| }
 | |
| 
 | |
| }
 |