Skip to content

Commit 8627fbe

Browse files
authored
ArenaProfiler: Fix clang-tidy warning (#4128)
When TINY_PROFILING is off, ~ArenaProfiler is trivial. So clang-tidy wants us to use `= default`.
1 parent de4dc97 commit 8627fbe

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Src/Base/AMReX_Arena.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,14 +660,21 @@ The_Comms_Arena ()
660660
}
661661
}
662662

663-
Arena::ArenaProfiler::~ArenaProfiler () {
664663
#ifdef AMREX_TINY_PROFILING
664+
665+
Arena::ArenaProfiler::~ArenaProfiler ()
666+
{
665667
if (m_do_profiling) {
666668
TinyProfiler::DeregisterArena(m_profiling_stats);
667669
}
668-
#endif
669670
}
670671

672+
#else
673+
674+
Arena::ArenaProfiler::~ArenaProfiler () = default;
675+
676+
#endif
677+
671678
void Arena::ArenaProfiler::profile_alloc ([[maybe_unused]] void* ptr,
672679
[[maybe_unused]] std::size_t nbytes) {
673680
#ifdef AMREX_TINY_PROFILING

0 commit comments

Comments
 (0)