Skip to content

Commit

Permalink
more sort test
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jun 2, 2024
1 parent 6d6d6b5 commit 4eb2529
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Handler.cpp
Original file line number Diff line number Diff line change
@@ -117,7 +117,10 @@ void Handler::updateHookMetadata(HookHandle const& hook, HookMetadata const& met
void Handler::reorderFunctions() {
auto& vec = m_content->m_functions;
std::cout << "functions size " << vec.size() << std::endl;
std::sort(m_content->m_functions.begin(), m_content->m_functions.end());
std::sort(m_content->m_functions.begin(), m_content->m_functions.end(), [this](auto const a, auto const b) {
std::cout << "reordering " << m_handles[a] << " " << m_handles[b] << std::endl;
return a < b;
});
// std::sort(vec.begin(), vec.end(), [this](auto const a, auto const b) {
// std::cout << "reordering " << m_handles[a] << " " << m_handles[b] << std::endl;
// return (m_hooks.at(m_handles[a])->m_metadata.m_priority < m_hooks.at(m_handles[b])->m_metadata.m_priority);

0 comments on commit 4eb2529

Please sign in to comment.