mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:52:44 +00:00 
			
		
		
		
	 f3db548a3d
			
		
	
	
		f3db548a3d
		
	
	
	
	
		
			
			DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so let's rename it to A) match the name of DeprecatedString, B) write a new FlyString class that is tied to String.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			650 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			650 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/SVG/AttributeNames.h>
 | |
| 
 | |
| namespace Web::SVG::AttributeNames {
 | |
| 
 | |
| #define __ENUMERATE_SVG_ATTRIBUTE(name) DeprecatedFlyString name;
 | |
| ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
 | |
| #undef __ENUMERATE_SVG_ATTRIBUTE
 | |
| 
 | |
| [[gnu::constructor]] static void initialize()
 | |
| {
 | |
|     static bool s_initialized = false;
 | |
|     if (s_initialized)
 | |
|         return;
 | |
| 
 | |
| #define __ENUMERATE_SVG_ATTRIBUTE(name) \
 | |
|     name = #name;
 | |
|     ENUMERATE_SVG_ATTRIBUTES(__ENUMERATE_SVG_ATTRIBUTE)
 | |
| #undef __ENUMERATE_SVG_ATTRIBUTE
 | |
| 
 | |
|     s_initialized = true;
 | |
| }
 | |
| 
 | |
| }
 |