aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-09-09 23:21:46 -0700
committerChris Robinson <[email protected]>2020-09-09 23:21:46 -0700
commitbb63d5aab37692d40683ab06638e87e4b6d32839 (patch)
tree97a6253192c46b4d50957bc3f05117602d9188b1 /alc
parentce0a45cbc7b64fa93c9a6df87a0116824e8a85d8 (diff)
Simplify clearing an array
Diffstat (limited to 'alc')
-rw-r--r--alc/alcmain.h7
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;
}