| 5 | #include "AStacktrace.h" |
| 6 | |
| 7 | aui::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 | } |
no test coverage detected