@@ -109,9 +109,9 @@ auto LookupEffectSlot(std::nothrow_t, gsl::not_null<al::Context*> const context,
109109 if (lidx >= context->mEffectSlotList .size ()) [[unlikely]]
110110 return nullptr ;
111111 auto &sublist = context->mEffectSlotList [lidx];
112- if (sublist.FreeMask & (1_u64 << slidx)) [[unlikely]]
112+ if (sublist.mFreeMask & (1_u64 << slidx)) [[unlikely]]
113113 return nullptr ;
114- return std::to_address (std::next (sublist.EffectSlots ->begin (), slidx));
114+ return std::to_address (std::next (sublist.mEffectSlots ->begin (), slidx));
115115}
116116
117117[[nodiscard]]
@@ -157,9 +157,9 @@ auto LookupBuffer(std::nothrow_t, gsl::not_null<al::Device*> const device, u32 c
157157 if (lidx >= device->BufferList .size ()) [[unlikely]]
158158 return nullptr ;
159159 auto &sublist = device->BufferList [lidx];
160- if (sublist.FreeMask & (1_u64 << slidx)) [[unlikely]]
160+ if (sublist.mFreeMask & (1_u64 << slidx)) [[unlikely]]
161161 return nullptr ;
162- return std::to_address (std::next (sublist.Buffers ->begin (), slidx));
162+ return std::to_address (std::next (sublist.mBuffers ->begin (), slidx));
163163}
164164
165165[[nodiscard]]
@@ -272,16 +272,16 @@ try {
272272 auto count = std::accumulate (context->mEffectSlotList .cbegin (),
273273 context->mEffectSlotList .cend (), 0_uz,
274274 [](usize const cur, const EffectSlotSubList &sublist) noexcept -> usize
275- { return cur + gsl::narrow_cast<ALuint>(std::popcount (sublist.FreeMask )); });
275+ { return cur + gsl::narrow_cast<ALuint>(std::popcount (sublist.mFreeMask )); });
276276
277277 while (needed > count)
278278 {
279279 if (context->mEffectSlotList .size () >= 1 <<25 ) [[unlikely]]
280280 return false ;
281281
282282 auto sublist = EffectSlotSubList{};
283- sublist.FreeMask = ~0_u64;
284- sublist.EffectSlots = SubListAllocator{}.allocate (1 );
283+ sublist.mFreeMask = ~0_u64;
284+ sublist.mEffectSlots = SubListAllocator{}.allocate (1 );
285285 context->mEffectSlotList .emplace_back (std::move (sublist));
286286 count += std::tuple_size_v<SubListAllocator::value_type>;
287287 }
@@ -295,21 +295,21 @@ catch(...) {
295295auto AllocEffectSlot (gsl::not_null<al::Context*> const context) -> gsl::not_null<ALeffectslot*>
296296{
297297 auto const sublist = std::ranges::find_if (context->mEffectSlotList ,
298- &EffectSlotSubList::FreeMask );
298+ &EffectSlotSubList::mFreeMask );
299299 auto const lidx = gsl::narrow_cast<u32 >(std::distance (context->mEffectSlotList .begin (),
300300 sublist));
301- auto const slidx = gsl::narrow_cast<u32 >(std::countr_zero (sublist->FreeMask ));
301+ auto const slidx = gsl::narrow_cast<u32 >(std::countr_zero (sublist->mFreeMask ));
302302 ASSUME (slidx < 64 );
303303
304304 auto const slot = gsl::make_not_null (std::construct_at (
305- std::to_address (std::next (sublist->EffectSlots ->begin (), slidx)), context));
305+ std::to_address (std::next (sublist->mEffectSlots ->begin (), slidx)), context));
306306 aluInitEffectPanning (slot->mSlot , context);
307307
308308 /* Add 1 to avoid ID 0. */
309309 slot->mId = ((lidx<<6 ) | slidx) + 1 ;
310310
311311 context->mNumEffectSlots += 1 ;
312- sublist->FreeMask &= ~(1_u64 << slidx);
312+ sublist->mFreeMask &= ~(1_u64 << slidx);
313313
314314 return slot;
315315}
@@ -325,7 +325,7 @@ void FreeEffectSlot(gsl::not_null<al::Context*> const context,
325325
326326 std::destroy_at (std::to_address (slot));
327327
328- context->mEffectSlotList [lidx].FreeMask |= 1_u64 << slidx;
328+ context->mEffectSlotList [lidx].mFreeMask |= 1_u64 << slidx;
329329 context->mNumEffectSlots --;
330330}
331331
@@ -534,7 +534,7 @@ try {
534534 case AL_BUFFER:
535535 if (auto const *const buffer = slot->mBuffer .get ())
536536 {
537- if (buffer->id == as_unsigned (value))
537+ if (buffer->mId == as_unsigned (value))
538538 return ;
539539 }
540540 else if (value == 0 )
@@ -710,7 +710,7 @@ try {
710710
711711 case AL_BUFFER:
712712 if (auto *buffer = slot->mBuffer .get ())
713- *value = as_signed (buffer->id );
713+ *value = as_signed (buffer->mId );
714714 else
715715 *value = 0 ;
716716 return ;
@@ -904,13 +904,12 @@ void ALeffectslot::updateProps(gsl::not_null<al::Context*> context) const
904904 }
905905}
906906
907- void ALeffectslot::SetName (gsl::not_null<al::Context*> context, ALuint id, std::string_view name)
907+ void ALeffectslot::SetName (gsl::not_null<al::Context*> const context, u32 id,
908+ std::string_view const name)
908909{
909910 const auto slotlock = std::lock_guard{context->mEffectSlotLock };
910911
911- auto slot = LookupEffectSlot (context, id);
912- if (!slot)
913- context->throw_error (AL_INVALID_NAME, " Invalid effect slot ID {}" , id);
912+ std::ignore = LookupEffectSlot (context, id);
914913
915914 context->mEffectSlotNames .insert_or_assign (id, name);
916915}
@@ -920,13 +919,13 @@ void UpdateAllEffectSlotProps(gsl::not_null<al::Context*> context)
920919 const auto slotlock = std::lock_guard{context->mEffectSlotLock };
921920 for (auto &sublist : context->mEffectSlotList )
922921 {
923- auto usemask = ~sublist.FreeMask ;
922+ auto usemask = ~sublist.mFreeMask ;
924923 while (usemask)
925924 {
926925 const auto idx = as_unsigned (std::countr_zero (usemask));
927926 usemask ^= 1_u64 << idx;
928927
929- auto &slot = (*sublist.EffectSlots )[idx];
928+ auto &slot = (*sublist.mEffectSlots )[idx];
930929 if (std::exchange (slot.mPropsDirty , false ))
931930 slot.updateProps (context);
932931 }
@@ -935,19 +934,19 @@ void UpdateAllEffectSlotProps(gsl::not_null<al::Context*> context)
935934
936935EffectSlotSubList::~EffectSlotSubList ()
937936{
938- if (!EffectSlots )
937+ if (!mEffectSlots )
939938 return ;
940939
941- uint64_t usemask{~FreeMask };
940+ uint64_t usemask{~mFreeMask };
942941 while (usemask)
943942 {
944943 const int idx{std::countr_zero (usemask)};
945- std::destroy_at (std::to_address (EffectSlots ->begin () + idx));
944+ std::destroy_at (std::to_address (mEffectSlots ->begin () + idx));
946945 usemask &= ~(1_u64 << idx);
947946 }
948- FreeMask = ~usemask;
949- SubListAllocator{}.deallocate (EffectSlots , 1 );
950- EffectSlots = nullptr ;
947+ mFreeMask = ~usemask;
948+ SubListAllocator{}.deallocate (mEffectSlots , 1 );
949+ mEffectSlots = nullptr ;
951950}
952951
953952
0 commit comments