MCPcopy Create free account
hub / github.com/aui-framework/aui / stripBeforeFunctionCall

Method stripBeforeFunctionCall

aui.core/src/AUI/Platform/AStacktrace.cpp:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "AStacktrace.h"
6
7aui::range<AStacktrace::iterator> AStacktrace::stripBeforeFunctionCall(void* pFunction, int maxAllowedOffsetInBytes) {
8 auto it = std::find_if(begin(), end(), [&](const Entry& e) {
9 return (reinterpret_cast<std::uintptr_t>(e.ptr()) - reinterpret_cast<std::uintptr_t>(pFunction)) <= maxAllowedOffsetInBytes;
10 });
11 if (it != end()) {
12 return { std::next(it), end() };
13 }
14 return *this;
15}

Callers 1

Calls 3

beginFunction · 0.70
endFunction · 0.70
ptrMethod · 0.45

Tested by

no test coverage detected