diff options
author | Chris Robinson <[email protected]> | 2020-09-09 23:21:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-09-09 23:21:46 -0700 |
commit | bb63d5aab37692d40683ab06638e87e4b6d32839 (patch) | |
tree | 97a6253192c46b4d50957bc3f05117602d9188b1 | |
parent | ce0a45cbc7b64fa93c9a6df87a0116824e8a85d8 (diff) |
Simplify clearing an array
-rw-r--r-- | alc/alcmain.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/alc/alcmain.h b/alc/alcmain.h index a641f4c8..7a6c952f 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -139,12 +139,7 @@ public: { mSamples = FloatArray::Create(new_size); } void clear() noexcept { - for(auto &chan : mChannels) - { - chan.Gain = 1.0f; - chan.Length = 0; - chan.Buffer = nullptr; - } + mChannels.fill(DistData{}); mSamples = nullptr; } |