Commit fb43aae7 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'thread.AthContainers-20200224' into 'master'

AthContainers: Suppress some thread-safety checker warnings.

See merge request !30564
parents 8c143b1d b3ea63ee
// Dear emacs, this is -*- c++ -*- // Dear emacs, this is -*- c++ -*-
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
// $Id: ConstDataVector.icc 717853 2016-01-14 21:41:19Z ssnyder $ // $Id: ConstDataVector.icc 717853 2016-01-14 21:41:19Z ssnyder $
...@@ -571,8 +571,9 @@ template <class DV> ...@@ -571,8 +571,9 @@ template <class DV>
inline inline
void ConstDataVector<DV>::push_back(std::unique_ptr<const base_value_type> pElem) void ConstDataVector<DV>::push_back(std::unique_ptr<const base_value_type> pElem)
{ {
std::unique_ptr<typename DV::base_value_type> ptr typename DV::value_type ptmp ATLAS_THREAD_SAFE =
(const_cast<typename DV::value_type> (pElem.release())); const_cast<typename DV::value_type> (pElem.release());
std::unique_ptr<typename DV::base_value_type> ptr (ptmp);
DV::push_back (std::move (ptr)); DV::push_back (std::move (ptr));
} }
...@@ -594,8 +595,9 @@ typename ConstDataVector<DV>::iterator ...@@ -594,8 +595,9 @@ typename ConstDataVector<DV>::iterator
ConstDataVector<DV>::insert(iterator position, ConstDataVector<DV>::insert(iterator position,
std::unique_ptr<const base_value_type> pElem) std::unique_ptr<const base_value_type> pElem)
{ {
std::unique_ptr<typename DV::base_value_type> ptr typename DV::value_type ptmp ATLAS_THREAD_SAFE =
(const_cast<typename DV::value_type> (pElem.release())); const_cast<typename DV::value_type> (pElem.release());
std::unique_ptr<typename DV::base_value_type> ptr (ptmp);
return to_my_iterator return to_my_iterator
(DV::insert (to_base_iterator (position), std::move (ptr))); (DV::insert (to_base_iterator (position), std::move (ptr)));
} }
...@@ -1133,7 +1135,10 @@ namespace SG { ...@@ -1133,7 +1135,10 @@ namespace SG {
template <class DV> template <class DV>
DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket
(ConstDataVector<DV>* data) (ConstDataVector<DV>* data)
: DVLDataBucket<DV> (const_cast<DV*> (data->asDataVector())) : DVLDataBucket<DV>
([] (const DV* dv) { DV* dv_nc ATLAS_THREAD_SAFE = const_cast<DV*> (dv);
return dv_nc; }
(data->asDataVector()))
{ {
} }
...@@ -1145,7 +1150,10 @@ DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket ...@@ -1145,7 +1150,10 @@ DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket
template <class DV> template <class DV>
DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket DVLConstDataVectorBucket<DV>::DVLConstDataVectorBucket
(std::unique_ptr<ConstDataVector<DV> > data) (std::unique_ptr<ConstDataVector<DV> > data)
: DVLDataBucket<DV> (std::unique_ptr<DV> (const_cast<DV*> (data.release()->asDataVector()))) : DVLDataBucket<DV> (std::unique_ptr<DV>
([] (const DV* dv) { DV* dv_nc ATLAS_THREAD_SAFE = const_cast<DV*> (dv);
return dv_nc; }
(data.release()->asDataVector())))
{ {
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment