diff options
author | Chris Robinson <[email protected]> | 2018-12-15 01:48:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-15 01:48:54 -0800 |
commit | 640c06c292632f2ac78d349b0ad3b8b5f000c61a (patch) | |
tree | dfb3f11c053054f27154c96506eb13d458d559ba /Alc/alc.cpp | |
parent | 4d36730baa0aac3cc874488d9c7503f02e7cb0ab (diff) |
Avoid some explicit loop counts
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 5ef486cf..2a76c846 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -1359,10 +1359,8 @@ static ALCboolean IsValidAmbiScaling(ALCenum scaling) */ void SetDefaultWFXChannelOrder(ALCdevice *device) { - ALsizei i; - - for(i = 0;i < MAX_OUTPUT_CHANNELS;i++) - device->RealOut.ChannelName[i] = InvalidChannel; + std::fill(std::begin(device->RealOut.ChannelName), std::end(device->RealOut.ChannelName), + InvalidChannel); switch(device->FmtChans) { @@ -1450,10 +1448,8 @@ void SetDefaultWFXChannelOrder(ALCdevice *device) */ void SetDefaultChannelOrder(ALCdevice *device) { - ALsizei i; - - for(i = 0;i < MAX_OUTPUT_CHANNELS;i++) - device->RealOut.ChannelName[i] = InvalidChannel; + std::fill(std::begin(device->RealOut.ChannelName), std::end(device->RealOut.ChannelName), + InvalidChannel); switch(device->FmtChans) { |