diff options
author | Chris Robinson <[email protected]> | 2023-09-22 13:13:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-09-22 13:13:09 -0700 |
commit | c53ed17c59345526ba41b62bd886c2cbaaca423b (patch) | |
tree | 22c1d8f985201152f07817ec2f68994aba769cee /alc/device.cpp | |
parent | bc5b58464ce52097efdb53c8019ba048e7ee3ba8 (diff) |
Avoid casting an integer literal
Diffstat (limited to 'alc/device.cpp')
-rw-r--r-- | alc/device.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alc/device.cpp b/alc/device.cpp index 66b13c5e..27aa6f36 100644 --- a/alc/device.cpp +++ b/alc/device.cpp @@ -34,19 +34,19 @@ ALCdevice::~ALCdevice() Backend = nullptr; - size_t count{std::accumulate(BufferList.cbegin(), BufferList.cend(), size_t{0u}, + size_t count{std::accumulate(BufferList.cbegin(), BufferList.cend(), 0_uz, [](size_t cur, const BufferSubList &sublist) noexcept -> size_t { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); })}; if(count > 0) WARN("%zu Buffer%s not deleted\n", count, (count==1)?"":"s"); - count = std::accumulate(EffectList.cbegin(), EffectList.cend(), size_t{0u}, + count = std::accumulate(EffectList.cbegin(), EffectList.cend(), 0_uz, [](size_t cur, const EffectSubList &sublist) noexcept -> size_t { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); }); if(count > 0) WARN("%zu Effect%s not deleted\n", count, (count==1)?"":"s"); - count = std::accumulate(FilterList.cbegin(), FilterList.cend(), size_t{0u}, + count = std::accumulate(FilterList.cbegin(), FilterList.cend(), 0_uz, [](size_t cur, const FilterSubList &sublist) noexcept -> size_t { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); }); if(count > 0) |