2424
2525namespace iox
2626{
27- // / @ NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
28- // / into the list
29- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
27+ // NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
28+ // into the list
29+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
3030template <typename T, uint64_t Capacity>
3131inline list<T, Capacity>::list() noexcept
3232{
3333 init ();
3434}
3535
36- // / @ NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
37- // / into the list
38- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
36+ // NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
37+ // into the list
38+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
3939template <typename T, uint64_t Capacity>
4040inline list<T, Capacity>::list(const list& rhs) noexcept
4141{
4242 init ();
4343 *this = rhs;
4444}
4545
46- // / @ NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
47- // / into the list
48- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
46+ // NOLINTJUSTIFICATION m_data fields are explicitly initialized whenever a new element is inserted
47+ // into the list
48+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
4949template <typename T, uint64_t Capacity>
5050inline list<T, Capacity>::list(list&& rhs) noexcept
5151{
@@ -371,6 +371,7 @@ inline bool list<T, Capacity>::push_front(const T& data) noexcept
371371}
372372
373373template <typename T, uint64_t Capacity>
374+ // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved) perfect forwarding is used
374375inline bool list<T, Capacity>::push_front(T&& data) noexcept
375376{
376377 auto sizeBeforePush = m_size;
@@ -394,6 +395,7 @@ inline bool list<T, Capacity>::push_back(const T& data) noexcept
394395}
395396
396397template <typename T, uint64_t Capacity>
398+ // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved) perfect forwarding is used
397399inline bool list<T, Capacity>::push_back(T&& data) noexcept
398400{
399401 auto sizeBeforePush = m_size;
@@ -427,6 +429,7 @@ inline typename list<T, Capacity>::iterator list<T, Capacity>::insert(const_iter
427429}
428430
429431template <typename T, uint64_t Capacity>
432+ // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved) perfect forwarding is used
430433inline typename list<T, Capacity>::iterator list<T, Capacity>::insert(const_iterator citer, T&& data) noexcept
431434{
432435 return emplace (citer, std::forward<T>(data));
@@ -466,9 +469,9 @@ template <bool IsConstIterator>
466469inline typename list<T, Capacity>::template IteratorBase<IsConstIterator>&
467470list<T, Capacity>::IteratorBase<IsConstIterator>::operator =(const IteratorBase<false >& rhs) noexcept
468471{
469- // / @ NOLINTJUSTIFICATION ensure that this and rhs are not the same object without taking the type into account
470- // / required since it is possible to assign a non const iterator to a const iterator
471- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
472+ // NOLINTJUSTIFICATION ensure that this and rhs are not the same object without taking the type into account
473+ // required since it is possible to assign a non const iterator to a const iterator
474+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
472475 if (reinterpret_cast <const void *>(this ) != reinterpret_cast <const void *>(&rhs))
473476 {
474477 m_list = rhs.m_list ;
@@ -594,9 +597,9 @@ inline const typename list<T, Capacity>::size_type& list<T, Capacity>::getPrevId
594597template <typename T, uint64_t Capacity>
595598inline typename list<T, Capacity>::size_type& list<T, Capacity>::getPrevIdx(const size_type idx) noexcept
596599{
597- // / @ NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
598- // / restored
599- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
600+ // NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
601+ // restored
602+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
600603 return const_cast <size_type&>(const_cast <const list<T, Capacity>*>(this )->getPrevIdx (idx));
601604}
602605
@@ -608,9 +611,9 @@ inline const typename list<T, Capacity>::size_type& list<T, Capacity>::getNextId
608611template <typename T, uint64_t Capacity>
609612inline typename list<T, Capacity>::size_type& list<T, Capacity>::getNextIdx(const size_type idx) noexcept
610613{
611- // / @ NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
612- // / restored
613- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
614+ // NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
615+ // restored
616+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
614617 return const_cast <size_type&>(const_cast <const list<T, Capacity>*>(this )->getNextIdx (idx));
615618}
616619
@@ -656,17 +659,17 @@ inline const T* list<T, Capacity>::getDataPtrFromIdx(const size_type idx) const
656659{
657660 IOX_ENFORCE (isValidElementIdx (idx), " invalid list element" );
658661
659- // / @ NOLINTJUSTIFICATION provide type safe access to the encapsulated untyped m_data array
660- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
662+ // NOLINTJUSTIFICATION provide type safe access to the encapsulated untyped m_data array
663+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
661664 return &(reinterpret_cast <const T*>(&m_data)[idx]);
662665}
663666
664667template <typename T, uint64_t Capacity>
665668inline T* list<T, Capacity>::getDataPtrFromIdx(const size_type idx) noexcept
666669{
667- // / @ NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
668- // / restored
669- // / @ NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
670+ // NOLINTJUSTIFICATION const_cast avoids code duplication, is safe since the constness of the return value is
671+ // restored
672+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
670673 return const_cast <T*>(const_cast <const list<T, Capacity>*>(this )->getDataPtrFromIdx (idx));
671674}
672675
0 commit comments