File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838#elif defined(DISTRHO_PLUGIN_TARGET_LV2)
3939# if defined(DISTRHO_PLUGIN_AND_UI_IN_SINGLE_OBJECT)
4040# if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
41- # warning Using single/monolithic LV2 target while DISTRHO_PLUGIN_WANT_DIRECT_ACCESS is 0
41+ WARNING ( " Using single/monolithic LV2 target while DISTRHO_PLUGIN_WANT_DIRECT_ACCESS is 0" )
4242# endif
4343# else
4444# define DISTRHO_PLUGIN_AND_UI_IN_SINGLE_OBJECT DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
Original file line number Diff line number Diff line change 3030// FIXME make Mutex stop relying on pthread
3131#ifdef _MSC_VER
3232#define DISTRHO_OS_WINDOWS__TODO
33- # pragma NOTE( DPF Mutex implementation is TODO on MSVC)
33+ WARNING ( " DPF Mutex implementation is TODO on MSVC" )
3434#else
3535#include < pthread.h>
3636#endif
Original file line number Diff line number Diff line change 8686#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 480
8787# define DISTRHO_DEPRECATED __attribute__ ((deprecated))
8888#elif defined(_MSC_VER)
89- # define DISTRHO_DEPRECATED [[deprecated]] /* Note: __declspec(deprecated) it not applicable to enum members */
89+ # define DISTRHO_DEPRECATED [[deprecated]] /* Note: __declspec(deprecated) is not applicable to enum members */
9090#else
9191# define DISTRHO_DEPRECATED
9292#endif
@@ -221,6 +221,13 @@ private: \
221221#define CPP_AGGREGATE_INIT (ClassName ) (ClassName)
222222#endif
223223
224+ #define _PRAGMA_HELPER (x ) _Pragma (#x)
225+ #if defined(_MSC_VER)
226+ #define WARNING (msg ) _PRAGMA_HELPER(message(__FILE__ " : warning: " msg))
227+ #elif defined(__GNUC__)
228+ #define WARNING (msg ) _PRAGMA_HELPER(GCC warning msg)
229+ #endif
230+
224231/* Useful typedefs */
225232typedef unsigned char uchar;
226233typedef unsigned short int ushort;
Original file line number Diff line number Diff line change 148148// Test for wrong compiler macros
149149
150150#if defined(DISTRHO_PLUGIN_HAS_EMBED_UI )
151- # warning DISTRHO_PLUGIN_HAS_EMBED_UI has been removed, it is now always on
151+ WARNING ( " DISTRHO_PLUGIN_HAS_EMBED_UI has been removed, it is now always on" )
152152#endif
153153
154154#if defined(DISTRHO_PLUGIN_HAS_EXTERNAL_UI )
202202// Enable state if plugin wants state files (deprecated)
203203
204204#ifdef DISTRHO_PLUGIN_WANT_STATEFILES
205- # warning DISTRHO_PLUGIN_WANT_STATEFILES is deprecated
205+ WARNING ( " DISTRHO_PLUGIN_WANT_STATEFILES is deprecated" )
206206# undef DISTRHO_PLUGIN_WANT_STATEFILES
207207# if ! DISTRHO_PLUGIN_WANT_STATE
208208# undef DISTRHO_PLUGIN_WANT_STATE
214214// Enable full state if plugin exports presets
215215
216216#if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && defined(DISTRHO_PLUGIN_WANT_FULL_STATE_WAS_NOT_SET )
217- # warning Plugins with programs and state should implement full state API too
217+ WARNING ( " Plugins with programs and state should implement full state API too" )
218218# undef DISTRHO_PLUGIN_WANT_FULL_STATE
219219# define DISTRHO_PLUGIN_WANT_FULL_STATE 1
220220#endif
Original file line number Diff line number Diff line change 2727#endif
2828
2929#if DISTRHO_PLUGIN_WANT_TIMEPOS && !defined(DISTRHO_NO_WARNINGS)
30- # warning LADSPA/DSSI does not support TimePos
30+ WARNING ( " LADSPA/DSSI does not support TimePos" )
3131#endif
3232
3333#ifdef DISTRHO_PLUGIN_TARGET_DSSI
3838# error Cannot use MIDI with LADSPA
3939# endif
4040# if DISTRHO_PLUGIN_WANT_STATE && !defined(DISTRHO_NO_WARNINGS)
41- # warning LADSPA cannot handle states
41+ WARNING ( " LADSPA cannot handle states" )
4242# endif
4343#endif
4444
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ class PluginVst : public ParameterAndNotesHelper
426426 fUsingNsView = true ;
427427 #else
428428 #ifndef DISTRHO_NO_WARNINGS
429- # warning 32bit VST UIs on macOS only work if the host supports " hasCockosViewAsConfig"
429+ WARNING ( " 32bit VST UIs on macOS only work if the host supports ' hasCockosViewAsConfig' " )
430430 #endif
431431 fUsingNsView = false ;
432432 #endif
You can’t perform that action at this time.
0 commit comments