Skip to content

Commit

Permalink
ArenaProfiler: Fix clang-tidy warning (#4128)
Browse files Browse the repository at this point in the history
When TINY_PROFILING is off, ~ArenaProfiler is trivial. So clang-tidy
wants us to use `= default`.
  • Loading branch information
WeiqunZhang committed Sep 4, 2024
1 parent de4dc97 commit 8627fbe
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Src/Base/AMReX_Arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,14 +660,21 @@ The_Comms_Arena ()
}
}

Arena::ArenaProfiler::~ArenaProfiler () {
#ifdef AMREX_TINY_PROFILING

Arena::ArenaProfiler::~ArenaProfiler ()
{
if (m_do_profiling) {
TinyProfiler::DeregisterArena(m_profiling_stats);
}
#endif
}

#else

Arena::ArenaProfiler::~ArenaProfiler () = default;

#endif

void Arena::ArenaProfiler::profile_alloc ([[maybe_unused]] void* ptr,
[[maybe_unused]] std::size_t nbytes) {
#ifdef AMREX_TINY_PROFILING
Expand Down

0 comments on commit 8627fbe

Please sign in to comment.