Skip to content
Snippets Groups Projects
Commit dae3057f authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

AthAllocators: Fix gcc11 warning.

Check the result of dynamic_cast before dereferencing.
parent c3bc66e0
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
// $Id: ArenaHandleBaseAllocT.icc 470529 2011-11-24 23:54:22Z ssnyder $
/** /**
* @file AthAllocators/ArenaHandleBaseAllocT.icc * @file AthAllocators/ArenaHandleBaseAllocT.icc
* @author scott snyder * @author scott snyder
...@@ -107,7 +105,9 @@ template <typename ALLOC> ...@@ -107,7 +105,9 @@ template <typename ALLOC>
const typename ALLOC::Params& const typename ALLOC::Params&
ArenaHandleBaseAllocT<ALLOC>::params() const ArenaHandleBaseAllocT<ALLOC>::params() const
{ {
return dynamic_cast<const ALLOC*>(this->baseAllocator())->params(); const ALLOC* alloc = dynamic_cast<const ALLOC*>(this->baseAllocator());
if (!alloc) std::abort();
return alloc->params();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment