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

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
f.berti
Posts: 22
Joined: Thu Nov 02, 2017 5:50 pm

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

Post by f.berti » Tue Apr 10, 2018 2:06 pm

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

Post Reply