Fix SafeCountable callstack tracking
This commit is contained in:
parent
6f4515f005
commit
c6a7924b80
|
@ -66,7 +66,7 @@ struct SafeCountablePolicy
|
||||||
kak_assert(sc->m_count >= 0);
|
kak_assert(sc->m_count >= 0);
|
||||||
#ifdef SAFE_PTR_TRACK_CALLSTACKS
|
#ifdef SAFE_PTR_TRACK_CALLSTACKS
|
||||||
auto it = std::find_if(sc->m_callstacks.begin(), sc->m_callstacks.end(),
|
auto it = std::find_if(sc->m_callstacks.begin(), sc->m_callstacks.end(),
|
||||||
[=](const Callstack& cs) { return cs.ptr == ptr; });
|
[=](const SafeCountable::Callstack& cs) { return cs.ptr == ptr; });
|
||||||
kak_assert(it != sc->m_callstacks.end());
|
kak_assert(it != sc->m_callstacks.end());
|
||||||
sc->m_callstacks.erase(it);
|
sc->m_callstacks.erase(it);
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,7 +76,7 @@ struct SafeCountablePolicy
|
||||||
{
|
{
|
||||||
#ifdef SAFE_PTR_TRACK_CALLSTACKS
|
#ifdef SAFE_PTR_TRACK_CALLSTACKS
|
||||||
auto it = std::find_if(sc->m_callstacks.begin(), sc->m_callstacks.end(),
|
auto it = std::find_if(sc->m_callstacks.begin(), sc->m_callstacks.end(),
|
||||||
[=](const Callstack& cs) { return cs.ptr == from; });
|
[=](const SafeCountable::Callstack& cs) { return cs.ptr == from; });
|
||||||
kak_assert(it != sc->m_callstacks.end());
|
kak_assert(it != sc->m_callstacks.end());
|
||||||
it->ptr = to;
|
it->ptr = to;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user