mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	 d00b79568f
			
		
	
	
		d00b79568f
		
	
	
	
	
		
			
			https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			526 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			526 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Jack Karamanian <karamanian.jack@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Runtime/BooleanObject.h>
 | |
| #include <LibJS/Runtime/GlobalObject.h>
 | |
| 
 | |
| namespace JS {
 | |
| 
 | |
| BooleanObject* BooleanObject::create(GlobalObject& global_object, bool value)
 | |
| {
 | |
|     return global_object.heap().allocate<BooleanObject>(global_object, value, *global_object.boolean_prototype());
 | |
| }
 | |
| 
 | |
| BooleanObject::BooleanObject(bool value, Object& prototype)
 | |
|     : Object(prototype)
 | |
|     , m_value(value)
 | |
| {
 | |
| }
 | |
| }
 |