diff --git a/lib/kakoune/safe_ptr.hh b/lib/kakoune/safe_ptr.hh index 4d83a46..2b3d2b1 100644 --- a/lib/kakoune/safe_ptr.hh +++ b/lib/kakoune/safe_ptr.hh @@ -3,7 +3,11 @@ // #define SAFE_PTR_TRACK_CALLSTACKS -#include "assert.hh" +//King_DuckZ: +#include +#define kak_assert(a) assert(a) + +//#include "assert.hh" #include "ref_ptr.hh" #include @@ -57,6 +61,8 @@ struct SafeCountablePolicy ++sc->m_count; #ifdef SAFE_PTR_TRACK_CALLSTACKS sc->m_callstacks.emplace_back(ptr); + #else + static_cast(ptr); #endif } @@ -69,6 +75,8 @@ struct SafeCountablePolicy [=](const SafeCountable::Callstack& cs) { return cs.ptr == ptr; }); kak_assert(it != sc->m_callstacks.end()); sc->m_callstacks.erase(it); + #else + static_cast(ptr); #endif } @@ -79,6 +87,10 @@ struct SafeCountablePolicy [=](const SafeCountable::Callstack& cs) { return cs.ptr == from; }); kak_assert(it != sc->m_callstacks.end()); it->ptr = to; + #else + static_cast(sc); + static_cast(from); + static_cast(to); #endif } #else