X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fexceptiontrace.cpp;h=7a681c35010cee85277112cc2d5b9a5d7ec5fefa;hp=fb72223a84df776ee7cbd30cc40bdf92ce0ff86f;hb=41363aed34382386f915f17c1a961750b4fdcb14;hpb=20c897ece781e18ba54c41fd68e232ce566a938d diff --git a/source/debug/exceptiontrace.cpp b/source/debug/exceptiontrace.cpp index fb72223..7a681c3 100644 --- a/source/debug/exceptiontrace.cpp +++ b/source/debug/exceptiontrace.cpp @@ -20,7 +20,7 @@ struct HookThrow HookThrow::HookThrow() { - void *handle = dlopen(0, RTLD_LAZY); + void *handle = dlopen(nullptr, RTLD_LAZY); orig_cxa_throw = reinterpret_cast(dlvsym(handle, "__cxa_throw", "CXXABI_1.3")); dlclose(handle); } @@ -32,13 +32,7 @@ bool trace_enabled = false; Msp::Debug::Backtrace &get_thread_backtrace() { -#if __cplusplus>=201103L static thread_local Msp::Debug::Backtrace backtrace; -#elif defined(__GNUC__) - static __thread Msp::Debug::Backtrace backtrace; -#else - static Msp::Debug::Backtrace backtrace; -#endif return backtrace; }