mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:22:43 +00:00 
			
		
		
		
	 f0b3aa0331
			
		
	
	
		f0b3aa0331
		
	
	
	
	
		
			
			This silences a overeager warning in sonar cloud, warning that slicing could occur with `VariadicFormatParams` which derives from `TypeErasedFormatParams`. Reference: https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVPBO_k92xXUF3qWsm&open=AXuVPBO_k92xXUF3qWsm
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Format.h>
 | |
| 
 | |
| extern bool g_report_to_debug;
 | |
| 
 | |
| template<typename... Ts>
 | |
| void reportln(const StringView& format, Ts... args)
 | |
| {
 | |
|     if (g_report_to_debug) {
 | |
|         AK::VariadicFormatParams variadic_format_params { args... };
 | |
|         AK::vdbgln(format, variadic_format_params);
 | |
|     } else {
 | |
|         warnln(format, args...);
 | |
|     }
 | |
| }
 |