mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioBuffer: Make assertions more specific
This commit is contained in:
parent
545e9f353a
commit
7b6d41be3f
1 changed files with 8 additions and 2 deletions
|
|
@ -751,7 +751,10 @@ public:
|
|||
int numSamples,
|
||||
Type gainToApplyToSource = Type (1)) noexcept
|
||||
{
|
||||
jassert (&source != this || sourceChannel != destChannel);
|
||||
jassert (&source != this
|
||||
|| sourceChannel != destChannel
|
||||
|| sourceStartSample + numSamples <= destStartSample
|
||||
|| destStartSample + numSamples <= sourceStartSample);
|
||||
jassert (isPositiveAndBelow (destChannel, numChannels));
|
||||
jassert (destStartSample >= 0 && numSamples >= 0 && destStartSample + numSamples <= size);
|
||||
jassert (isPositiveAndBelow (sourceChannel, source.numChannels));
|
||||
|
|
@ -887,7 +890,10 @@ public:
|
|||
int sourceStartSample,
|
||||
int numSamples) noexcept
|
||||
{
|
||||
jassert (&source != this || sourceChannel != destChannel);
|
||||
jassert (&source != this
|
||||
|| sourceChannel != destChannel
|
||||
|| sourceStartSample + numSamples <= destStartSample
|
||||
|| destStartSample + numSamples <= sourceStartSample);
|
||||
jassert (isPositiveAndBelow (destChannel, numChannels));
|
||||
jassert (destStartSample >= 0 && destStartSample + numSamples <= size);
|
||||
jassert (isPositiveAndBelow (sourceChannel, source.numChannels));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue