aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-16 18:41:47 -0800
committerChris Robinson <[email protected]>2022-12-16 18:41:47 -0800
commitd281ffa9ce3abd8dfd5afd72914acebe4a4a92ff (patch)
tree59612d00cc9efa076c3565a743eab93378532326 /alc/alu.cpp
parent84cfef8513b88068e8ef66223d09b6c48d35caad (diff)
Use a bitset for the enabled event flags
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r--alc/alu.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index fdb51f78..a9bb5298 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1726,7 +1726,7 @@ void ProcessVoiceChanges(ContextBase *ctx)
VoiceChange *next{cur->mNext.load(std::memory_order_acquire)};
if(!next) return;
- const uint enabledevt{ctx->mEnabledEvts.load(std::memory_order_acquire)};
+ const auto enabledevt = ctx->mEnabledEvts.load(std::memory_order_acquire);
do {
cur = next;
@@ -1807,7 +1807,7 @@ void ProcessVoiceChanges(ContextBase *ctx)
}
oldvoice->mPendingChange.store(false, std::memory_order_release);
}
- if(sendevt && (enabledevt&AsyncEvent::SourceStateChange))
+ if(sendevt && enabledevt.test(AsyncEvent::SourceStateChange))
SendSourceStateEvent(ctx, cur->mSourceID, cur->mState);
next = cur->mNext.load(std::memory_order_acquire);
@@ -2172,8 +2172,7 @@ void DeviceBase::handleDisconnect(const char *msg, ...)
for(ContextBase *ctx : *mContexts.load())
{
- const uint enabledevt{ctx->mEnabledEvts.load(std::memory_order_acquire)};
- if((enabledevt&AsyncEvent::Disconnected))
+ if(ctx->mEnabledEvts.load(std::memory_order_acquire).test(AsyncEvent::Disconnected))
{
RingBuffer *ring{ctx->mAsyncEvents.get()};
auto evt_data = ring->getWriteVector().first;