Page 1 of 1

vstguibase.h defining NDEBUG, do you really have to?

Posted: Tue Apr 10, 2018 2:06 pm
by f.berti
Hello,

I've been spending some time on my code trying to understand why my asserts weren't failing and found the culprit in vstguibase.h:

Code: Select all

//----------------------------------------------------
#if DEVELOPMENT
	#ifndef DEBUG
		#define DEBUG	1
	#endif
#else
	#if !defined(NDEBUG) && !defined(DEBUG)
		#define NDEBUG	1
	#endif
#endif
My question is: do you really need to define NDEBUG (which is language specific) if DEVELOPMENT (which is VSTGUI specific) is not defined?
Can't you just leave it as is and let the user decide, since it affects all the standard-C assertions?
Seems a bit too extreme to me...

Regards,
Federico