1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 08:23:05 +03:00

Fix SafeCountable callstack tracking

This commit is contained in:
Maxime Coste 2017-01-21 12:10:24 +00:00
parent 6f4515f005
commit c6a7924b80

View File

@ -66,7 +66,7 @@ struct SafeCountablePolicy
kak_assert(sc->m_count >= 0);
#ifdef SAFE_PTR_TRACK_CALLSTACKS
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());
sc->m_callstacks.erase(it);
#endif
@ -76,7 +76,7 @@ struct SafeCountablePolicy
{
#ifdef SAFE_PTR_TRACK_CALLSTACKS
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());
it->ptr = to;
#endif