Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1345 Fix linker issue
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 13, 2022
1 parent bfc0fe9 commit 8cb2007
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ namespace iox
{
namespace popo
{
namespace internal
{
/// @todo iox-#1712 Add minVal() without reference to iox::algorithm?! C++11 needs a declaration for constexpr!
/// Ex.: constexpr uint32_t DefaultChunkDistributorConfig::MAX_HISTORY_CAPACITY;
/// This wouldn't be an issue in C++17.
Expand All @@ -29,18 +31,18 @@ constexpr T min(const T left, const T right) noexcept
{
return (left < right) ? left : right;
}
} // namespace internal

template <typename ChunkDistributorDataProperties, typename LockingPolicy, typename ChunkQueuePusherType>
inline ChunkDistributorData<ChunkDistributorDataProperties, LockingPolicy, ChunkQueuePusherType>::ChunkDistributorData(
const ConsumerTooSlowPolicy policy, const uint64_t historyCapacity) noexcept
: LockingPolicy()
, m_historyCapacity(min(historyCapacity, ChunkDistributorDataProperties_t::MAX_HISTORY_CAPACITY))
, m_historyCapacity(internal::min(historyCapacity, ChunkDistributorDataProperties_t::MAX_HISTORY_CAPACITY))
, m_consumerTooSlowPolicy(policy)
{
if (m_historyCapacity != historyCapacity)
{
LogWarn() << "Chunk history too large, reducing from " << historyCapacity << " to "
<< ChunkDistributorDataProperties_t::MAX_HISTORY_CAPACITY;
LogWarn() << "Chunk history too large, reducing from " << historyCapacity << " to " << m_historyCapacity;
}
}

Expand Down

0 comments on commit 8cb2007

Please sign in to comment.