Skip to content

Commit

Permalink
Change ssize_t in debug assertion to ptrdiff_t
Browse files Browse the repository at this point in the history
`ssize_t` is only officially defined on POSIX, and apparently this
results in compiler errors with Visual Studio 2022:

mixxxdj#11120 (comment)

`ptrdiff_t` is the closest type defined by the standard.
  • Loading branch information
robbert-vdh committed Dec 22, 2022
1 parent 0a15ae8 commit 2a5ae6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/bufferscalers/enginebufferscalerubberband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ SINT EngineBufferScaleRubberBand::retrieveAndDeinterleave(

void EngineBufferScaleRubberBand::deinterleaveAndProcess(
const CSAMPLE* pBuffer, SINT frames, bool flush) {
DEBUG_ASSERT(frames <= static_cast<ssize_t>(m_buffers[0].size()));
DEBUG_ASSERT(frames <= static_cast<ptrdiff_t>(m_buffers[0].size()));

SampleUtil::deinterleaveBuffer(
m_buffers[0].data(), m_buffers[1].data(), pBuffer, frames);
Expand Down

0 comments on commit 2a5ae6b

Please sign in to comment.