aboutsummaryrefslogtreecommitdiffstats
path: root/al/filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/filter.cpp')
-rw-r--r--al/filter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/al/filter.cpp b/al/filter.cpp
index 19d972e9..447bea7a 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -321,8 +321,7 @@ bool EnsureFilters(ALCdevice *device, size_t needed)
{
size_t count{std::accumulate(device->FilterList.cbegin(), device->FilterList.cend(), size_t{0},
[](size_t cur, const FilterSubList &sublist) noexcept -> size_t
- { return cur + static_cast<ALuint>(POPCNT64(sublist.FreeMask)); }
- )};
+ { return cur + static_cast<ALuint>(PopCount(sublist.FreeMask)); })};
while(needed > count)
{
@@ -351,7 +350,7 @@ ALfilter *AllocFilter(ALCdevice *device)
{ return entry.FreeMask != 0; }
);
auto lidx = static_cast<ALuint>(std::distance(device->FilterList.begin(), sublist));
- auto slidx = static_cast<ALuint>(CTZ64(sublist->FreeMask));
+ auto slidx = static_cast<ALuint>(CountTrailingZeros(sublist->FreeMask));
ALfilter *filter{::new(sublist->Filters + slidx) ALfilter{}};
InitFilterParams(filter, AL_FILTER_NULL);
@@ -702,7 +701,7 @@ FilterSubList::~FilterSubList()
uint64_t usemask{~FreeMask};
while(usemask)
{
- ALsizei idx = CTZ64(usemask);
+ const ALsizei idx{CountTrailingZeros(usemask)};
al::destroy_at(Filters+idx);
usemask &= ~(1_u64 << idx);
}