mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Speculative va_copy() fix for old versions of GCC/Clang. (cannot repro) (#1085)
This commit is contained in:
		@@ -1931,8 +1931,12 @@ bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
 | 
				
			|||||||
// On some platform vsnprintf() takes va_list by reference and modifies it.
 | 
					// On some platform vsnprintf() takes va_list by reference and modifies it.
 | 
				
			||||||
// va_copy is the 'correct' way to copy a va_list but Visual Studio prior to 2013 doesn't have it.
 | 
					// va_copy is the 'correct' way to copy a va_list but Visual Studio prior to 2013 doesn't have it.
 | 
				
			||||||
#ifndef va_copy
 | 
					#ifndef va_copy
 | 
				
			||||||
 | 
					#if defined(__GNUC__) || defined(__clang__)
 | 
				
			||||||
 | 
					#define va_copy(dest, src) __builtin_va_copy(dest, src)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
#define va_copy(dest, src) (dest = src)
 | 
					#define va_copy(dest, src) (dest = src)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Helper: Text buffer for logging/accumulating text
 | 
					// Helper: Text buffer for logging/accumulating text
 | 
				
			||||||
void ImGuiTextBuffer::appendfv(const char* fmt, va_list args)
 | 
					void ImGuiTextBuffer::appendfv(const char* fmt, va_list args)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user