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/context.cpp | |
parent | bc5b58464ce52097efdb53c8019ba048e7ee3ba8 (diff) |
Avoid casting an integer literal
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index 3b1de7b9..8c930056 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -127,7 +127,7 @@ ALCcontext::~ALCcontext() { TRACE("Freeing context %p\n", voidp{this}); - size_t count{std::accumulate(mSourceList.cbegin(), mSourceList.cend(), size_t{0u}, + size_t count{std::accumulate(mSourceList.cbegin(), mSourceList.cend(), 0_uz, [](size_t cur, const SourceSubList &sublist) noexcept -> size_t { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); })}; if(count > 0) @@ -140,7 +140,7 @@ ALCcontext::~ALCcontext() #endif // ALSOFT_EAX mDefaultSlot = nullptr; - count = std::accumulate(mEffectSlotList.cbegin(), mEffectSlotList.cend(), size_t{0u}, + count = std::accumulate(mEffectSlotList.cbegin(), mEffectSlotList.cend(), 0_uz, [](size_t cur, const EffectSlotSubList &sublist) noexcept -> size_t { return cur + static_cast<uint>(al::popcount(~sublist.FreeMask)); }); if(count > 0) |