mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:02: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
		
	
	
	
		
			554 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			554 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/XHR/EventNames.h>
 | |
| 
 | |
| namespace Web::XHR::EventNames {
 | |
| 
 | |
| #define __ENUMERATE_XHR_EVENT(name) DeprecatedFlyString name;
 | |
| ENUMERATE_XHR_EVENTS
 | |
| #undef __ENUMERATE_XHR_EVENT
 | |
| 
 | |
| [[gnu::constructor]] static void initialize()
 | |
| {
 | |
|     static bool s_initialized = false;
 | |
|     if (s_initialized)
 | |
|         return;
 | |
| 
 | |
| #define __ENUMERATE_XHR_EVENT(name) \
 | |
|     name = #name;
 | |
|     ENUMERATE_XHR_EVENTS
 | |
| #undef __ENUMERATE_XHR_EVENT
 | |
| 
 | |
|     s_initialized = true;
 | |
| }
 | |
| 
 | |
| }
 |