aboutsummaryrefslogtreecommitdiffstats
path: root/al/auxeffectslot.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-03 23:36:07 -0800
committerChris Robinson <[email protected]>2023-12-03 23:36:07 -0800
commitb6a68e8d510610e181d638ff993e327059bd6018 (patch)
tree3c58b34d96036c3f6036bc96bc8a2f80015b1310 /al/auxeffectslot.cpp
parent859319fa7864ed6a81af1f12c68627ab58bb7a7d (diff)
Remove some unnecessary atomic wrappers
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r--al/auxeffectslot.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index fb646389..31e9542b 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -370,7 +370,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteAuxiliaryEffectSlotsDirect(ALCcontext *cont
context->setError(AL_INVALID_NAME, "Invalid effect slot ID %u", effectslots[0]);
return;
}
- if(ReadRef(slot->ref) != 0) UNLIKELY
+ if(slot->ref.load(std::memory_order_relaxed) != 0) UNLIKELY
{
context->setError(AL_INVALID_OPERATION, "Deleting in-use effect slot %u",
effectslots[0]);
@@ -390,7 +390,7 @@ FORCE_ALIGN void AL_APIENTRY alDeleteAuxiliaryEffectSlotsDirect(ALCcontext *cont
context->setError(AL_INVALID_NAME, "Invalid effect slot ID %u", effectslots[i]);
return;
}
- if(ReadRef(slot->ref) != 0) UNLIKELY
+ if(slot->ref.load(std::memory_order_relaxed) != 0) UNLIKELY
{
context->setError(AL_INVALID_OPERATION, "Deleting in-use effect slot %u",
effectslots[i]);
@@ -1530,7 +1530,8 @@ void eax_delete_al_effect_slot(ALCcontext& context, ALeffectslot& effect_slot)
std::lock_guard<std::mutex> effect_slot_lock{context.mEffectSlotLock};
- if(ReadRef(effect_slot.ref) != 0) {
+ if(effect_slot.ref.load(std::memory_order_relaxed) != 0)
+ {
ERR(EAX_PREFIX "Deleting in-use effect slot %u.\n", effect_slot.id);
return;
}