diff options
author | Chris Robinson <[email protected]> | 2019-03-24 13:54:49 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-03-24 13:54:49 -0700 |
commit | f7ab7b45f7859da9e1ddd2960fcae110a8d10cd1 (patch) | |
tree | 18204622a14373c84bf3d21ceba23d6c82db4bc7 | |
parent | 12d4953a5fa3d21e7e77825816bb6c58443cf3ab (diff) |
Mark the device and context deletes as unlikely
-rw-r--r-- | Alc/alc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 8066e230..df001a72 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2245,7 +2245,7 @@ static void ALCdevice_DecRef(ALCdevice *device) { auto ref = DecrementRef(&device->ref); TRACEREF("%p decreasing refcount to %u\n", device, ref); - if(ref == 0) delete device; + if(UNLIKELY(ref == 0)) delete device; } /* Simple RAII device reference. Takes the reference of the provided ALCdevice, @@ -2538,7 +2538,7 @@ void ALCcontext_DecRef(ALCcontext *context) { auto ref = DecrementRef(&context->ref); TRACEREF("%p decreasing refcount to %u\n", context, ref); - if(ref == 0) delete context; + if(UNLIKELY(ref == 0)) delete context; } /* VerifyContext |