Skip to content

Commit 062fb97

Browse files
committed
Changed LightweightSemaphore::availableApprox() to return an unsigned type (following same change suggested by @kletoz for readerwriterqueue)
1 parent 9cfda6c commit 062fb97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lightweightsemaphore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,10 @@ class LightweightSemaphore
401401
}
402402
}
403403

404-
ssize_t availableApprox() const
404+
std::size_t availableApprox() const
405405
{
406406
ssize_t count = m_count.load(std::memory_order_relaxed);
407-
return count > 0 ? count : 0;
407+
return count > 0 ? static_cast<std::size_t>(count) : 0;
408408
}
409409
};
410410

0 commit comments

Comments
 (0)