diff options
author | Chris Robinson <[email protected]> | 2018-11-19 02:17:06 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 02:17:06 -0800 |
commit | c5142530d675885415c9168869eb6c125ce10876 (patch) | |
tree | 002ceb670126558bd0f1204c7b4db7302fb4d9f7 /Alc | |
parent | 6e114a7a70c90d575e5978c5bcac95307bec0140 (diff) |
Simplify the RefCount type
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 12 | ||||
-rw-r--r-- | Alc/hrtf.cpp | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 24783510..6bb632f7 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2476,15 +2476,13 @@ ALCdevice_struct::~ALCdevice_struct() void ALCdevice_IncRef(ALCdevice *device) { - uint ref; - ref = IncrementRef(&device->ref); + auto ref = IncrementRef(&device->ref); TRACEREF("%p increasing refcount to %u\n", device, ref); } void ALCdevice_DecRef(ALCdevice *device) { - uint ref; - ref = DecrementRef(&device->ref); + auto ref = DecrementRef(&device->ref); TRACEREF("%p decreasing refcount to %u\n", device, ref); if(ref == 0) delete device; } @@ -2728,20 +2726,20 @@ static bool ReleaseContext(ALCcontext *context, ALCdevice *device) static void ALCcontext_IncRef(ALCcontext *context) { - uint ref = IncrementRef(&context->ref); + auto ref = IncrementRef(&context->ref); TRACEREF("%p increasing refcount to %u\n", context, ref); } void ALCcontext_DecRef(ALCcontext *context) { - uint ref = DecrementRef(&context->ref); + auto ref = DecrementRef(&context->ref); TRACEREF("%p decreasing refcount to %u\n", context, ref); if(ref == 0) delete context; } static void ReleaseThreadCtx(ALCcontext *context) { - uint ref = DecrementRef(&context->ref); + auto ref = DecrementRef(&context->ref); TRACEREF("%p decreasing refcount to %u\n", context, ref); ERR("Context %p current for thread being destroyed, possible leak!\n", context); } diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp index 0393da65..034d5a49 100644 --- a/Alc/hrtf.cpp +++ b/Alc/hrtf.cpp @@ -1257,13 +1257,13 @@ struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry) void Hrtf_IncRef(struct Hrtf *hrtf) { - uint ref = IncrementRef(&hrtf->ref); + auto ref = IncrementRef(&hrtf->ref); TRACEREF("%p increasing refcount to %u\n", hrtf, ref); } void Hrtf_DecRef(struct Hrtf *hrtf) { - uint ref = DecrementRef(&hrtf->ref); + auto ref = DecrementRef(&hrtf->ref); TRACEREF("%p decreasing refcount to %u\n", hrtf, ref); if(ref == 0) { |