mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	use "std" namespace for "sprintf"
Some compilers don't export C compatibility functions in `::`. Using `std::sprintf` should work for those (and all other compilers). Reference: https://en.cppreference.com/w/cpp/header#C_compatibility_headers
This commit is contained in:
		 Girts Folkmanis
					Girts Folkmanis
				
			
				
					committed by
					
						 Martin Hořeňovský
						Martin Hořeňovský
					
				
			
			
				
	
			
			
			 Martin Hořeňovský
						Martin Hořeňovský
					
				
			
						parent
						
							dbbab8727c
						
					
				
				
					commit
					711d750ca7
				
			| @@ -36,7 +36,7 @@ namespace Catch { | ||||
| #ifdef _MSC_VER | ||||
|         sprintf_s(buffer, "%.3f", duration); | ||||
| #else | ||||
|         sprintf(buffer, "%.3f", duration); | ||||
|         std::sprintf(buffer, "%.3f", duration); | ||||
| #endif | ||||
|         return std::string(buffer); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user