29 #ifndef JUCE_PLATFORMDEFS_H_INCLUDED 30 #define JUCE_PLATFORMDEFS_H_INCLUDED 37 #ifdef JUCE_FORCE_DEBUG 47 #define JUCE_CALLTYPE __stdcall 48 #define JUCE_CDECL __cdecl 57 #if JUCE_LOG_ASSERTIONS || JUCE_DEBUG 58 #define juce_LogCurrentAssertion juce::logAssertion (__FILE__, __LINE__); 60 #define juce_LogCurrentAssertion 64 #if JUCE_IOS || JUCE_LINUX || JUCE_ANDROID || JUCE_PPC 70 #define juce_breakDebugger { ::kill (0, SIGTRAP); } 71 #elif JUCE_USE_MSVC_INTRINSICS 72 #ifndef __INTEL_COMPILER 73 #pragma intrinsic (__debugbreak) 75 #define juce_breakDebugger { __debugbreak(); } 76 #elif JUCE_GCC || JUCE_MAC 77 #if JUCE_NO_INLINE_ASM 78 #define juce_breakDebugger { } 80 #define juce_breakDebugger { asm ("int $3"); } 83 #define juce_breakDebugger { __asm int 3 } 86 #if JUCE_CLANG && defined (__has_feature) && ! defined (JUCE_ANALYZER_NORETURN) 87 #if __has_feature (attribute_analyzer_noreturn) 88 inline void __attribute__((analyzer_noreturn)) juce_assert_noreturn() {}
89 #define JUCE_ANALYZER_NORETURN juce_assert_noreturn(); 93 #ifndef JUCE_ANALYZER_NORETURN 94 #define JUCE_ANALYZER_NORETURN 98 #if JUCE_MSVC && ! DOXYGEN 99 #define MACRO_WITH_FORCED_SEMICOLON(x) \ 100 __pragma(warning(push)) \ 101 __pragma(warning(disable:4127)) \ 102 do { x } while (false) \ 103 __pragma(warning(pop)) 108 #define MACRO_WITH_FORCED_SEMICOLON(x) do { x } while (false) 112 #if JUCE_DEBUG || DOXYGEN 117 #define DBG(dbgtext) MACRO_WITH_FORCED_SEMICOLON (juce::String tempDbgBuf; tempDbgBuf << dbgtext; juce::Logger::outputDebugString (tempDbgBuf);) 124 #define jassertfalse MACRO_WITH_FORCED_SEMICOLON (juce_LogCurrentAssertion; if (juce::juce_isRunningUnderDebugger()) juce_breakDebugger; JUCE_ANALYZER_NORETURN) 134 #define jassert(expression) MACRO_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;) 141 #define jassertfalse MACRO_WITH_FORCED_SEMICOLON (juce_LogCurrentAssertion) 143 #if JUCE_LOG_ASSERTIONS 144 #define jassert(expression) MACRO_WITH_FORCED_SEMICOLON (if (! (expression)) jassertfalse;) 146 #define jassert(a) MACRO_WITH_FORCED_SEMICOLON ( ; ) 165 #define static_jassert(expression) juce::JuceStaticAssert<expression>::dummy(); 191 #define JUCE_DECLARE_NON_COPYABLE(className) \ 192 className (const className&) JUCE_DELETED_FUNCTION;\ 193 className& operator= (const className&) JUCE_DELETED_FUNCTION; 198 #define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className) \ 199 JUCE_DECLARE_NON_COPYABLE(className) \ 200 JUCE_LEAK_DETECTOR(className) 205 #define JUCE_PREVENT_HEAP_ALLOCATION \ 207 static void* operator new (size_t) JUCE_DELETED_FUNCTION; \ 208 static void operator delete (void*) JUCE_DELETED_FUNCTION; 213 #define JUCE_JOIN_MACRO_HELPER(a, b) a ## b 214 #define JUCE_STRINGIFY_MACRO_HELPER(a) #a 221 #define JUCE_JOIN_MACRO(item1, item2) JUCE_JOIN_MACRO_HELPER (item1, item2) 225 #define JUCE_STRINGIFY(item) JUCE_STRINGIFY_MACRO_HELPER (item) 229 #if JUCE_MSVC && ! defined (DOXYGEN) 230 #define JUCE_WARNING_HELPER(file, line, mess) message(file "(" JUCE_STRINGIFY (line) ") : Warning: " #mess) 231 #define JUCE_COMPILER_WARNING(message) __pragma(JUCE_WARNING_HELPER (__FILE__, __LINE__, message)); 234 #define JUCE_WARNING_HELPER(mess) message(#mess) 244 #define JUCE_COMPILER_WARNING(message) _Pragma(JUCE_STRINGIFY (JUCE_WARNING_HELPER (message))); 249 #if JUCE_CATCH_UNHANDLED_EXCEPTIONS 253 #define JUCE_CATCH_ALL catch (...) {} 254 #define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse; } 256 #if ! JUCE_MODULE_AVAILABLE_juce_gui_basics 257 #define JUCE_CATCH_EXCEPTION JUCE_CATCH_ALL 262 #define JUCE_CATCH_EXCEPTION \ 263 catch (const std::exception& e) \ 265 juce::JUCEApplicationBase::sendUnhandledException (&e, __FILE__, __LINE__); \ 269 juce::JUCEApplicationBase::sendUnhandledException (nullptr, __FILE__, __LINE__); \ 276 #define JUCE_CATCH_EXCEPTION 277 #define JUCE_CATCH_ALL 278 #define JUCE_CATCH_ALL_ASSERT 283 #if JUCE_DEBUG || DOXYGEN 289 #define forcedinline inline 292 #define forcedinline __forceinline 294 #define forcedinline inline __attribute__((always_inline)) 298 #if JUCE_MSVC || DOXYGEN 301 #define JUCE_ALIGN(bytes) __declspec (align (bytes)) 303 #define JUCE_ALIGN(bytes) __attribute__ ((aligned (bytes))) 310 #define JUCE_DEPRECATED(functionDef) 311 #define JUCE_DEPRECATED_WITH_BODY(functionDef, body) 312 #elif JUCE_MSVC && ! JUCE_NO_DEPRECATION_WARNINGS 313 #define JUCE_DEPRECATED(functionDef) __declspec(deprecated) functionDef 314 #define JUCE_DEPRECATED_WITH_BODY(functionDef, body) __declspec(deprecated) functionDef body 315 #elif JUCE_GCC && ! JUCE_NO_DEPRECATION_WARNINGS 316 #define JUCE_DEPRECATED(functionDef) functionDef __attribute__ ((deprecated)) 317 #define JUCE_DEPRECATED_WITH_BODY(functionDef, body) functionDef __attribute__ ((deprecated)) body 319 #define JUCE_DEPRECATED(functionDef) functionDef 320 #define JUCE_DEPRECATED_WITH_BODY(functionDef, body) functionDef body 324 #if JUCE_ANDROID && ! DOXYGEN 325 #define JUCE_MODAL_LOOPS_PERMITTED 0 326 #elif ! defined (JUCE_MODAL_LOOPS_PERMITTED) 329 #define JUCE_MODAL_LOOPS_PERMITTED 1 334 #define JUCE_PACKED __attribute__((packed)) 339 #endif // JUCE_PLATFORMDEFS_H_INCLUDED Definition: juce_audio_basics.cpp:75
#define true
Definition: ordinals.h:82
Definition: juce_PlatformDefs.h:155
static void dummy()
Definition: juce_PlatformDefs.h:156