Skip to content

Commit

Permalink
fix(libsinsp): pass shared_ptr by reference
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo authored and poiana committed Jul 23, 2024
1 parent 81f451e commit 1243787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userspace/libsinsp/sinsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ class SINSP_PUBLIC sinsp : public capture_stats_source
@throws a sinsp_exception containing the error string is thrown in case
of failure.
*/
inline threadinfo_map_t::ptr_t get_thread_ref(int64_t tid, bool query_os_if_not_found = false, bool lookup_only = true, bool main_thread = false)
inline const threadinfo_map_t::ptr_t& get_thread_ref(int64_t tid, bool query_os_if_not_found = false, bool lookup_only = true, bool main_thread = false)
{
return m_thread_manager->get_thread_ref(tid, query_os_if_not_found, lookup_only, main_thread);
}
Expand Down Expand Up @@ -1126,7 +1126,7 @@ class SINSP_PUBLIC sinsp : public capture_stats_source
// just for lookup reason. In that case, m_lastaccess_ts is not updated
// and m_last_tinfo is not set.
//
inline threadinfo_map_t::ptr_t find_thread(int64_t tid, bool lookup_only)
inline const threadinfo_map_t::ptr_t& find_thread(int64_t tid, bool lookup_only)
{
return m_thread_manager->find_thread(tid, lookup_only);
}
Expand Down

0 comments on commit 1243787

Please sign in to comment.