aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-25 18:49:12 -0800
committerChris Robinson <[email protected]>2018-12-25 18:49:12 -0800
commita7c58decfbf57fc5e502a1cbf8f40dd78c7465e5 (patch)
tree9fd66e75303c401acbe5230be0b0f9cf3c8e6fec /Alc/alu.cpp
parent497226f11e811923936e6978a8f68055f5fe7467 (diff)
Add a couple more ASSUMEs for number of channels and sends
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r--Alc/alu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index cad1a9e6..96d73d1a 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -578,6 +578,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
DirectChannels = false;
break;
}
+ ASSUME(num_channels > 0);
std::for_each(std::begin(voice->Direct.Params), std::begin(voice->Direct.Params)+num_channels,
[](DirectParams &params) -> void
@@ -587,6 +588,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev
}
);
const ALsizei NumSends{Device->NumAuxSends};
+ ASSUME(NumSends >= 0);
std::for_each(voice->Send+0, voice->Send+NumSends,
[num_channels](ALvoice::SendData &send) -> void
{