aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-10-01 21:45:44 -0700
committerChris Robinson <[email protected]>2019-10-01 21:45:44 -0700
commita0a55d300fef56c4422482ae8aeaabaf2a3c4178 (patch)
treef0ef0b897e779826815a1f8d42fb5136ec370b0b /alc
parente2c1602ede1b17a4499cb4fa737eae04dc529ce0 (diff)
Remove an unnecessary function
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 1b1e12dd..fad43f7b 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -842,13 +842,6 @@ constexpr ALchar alExtList[] =
std::atomic<ALCenum> LastNullDeviceError{ALC_NO_ERROR};
/* Thread-local current context */
-void ReleaseThreadCtx(ALCcontext *context)
-{
- const bool result{context->releaseIfNoDelete()};
- ERR("Context %p current for thread being destroyed%s!\n",
- decltype(std::declval<void*>()){context}, result ? "" : ", leak detected");
-}
-
class ThreadCtx {
ALCcontext *ctx{nullptr};
@@ -856,8 +849,11 @@ public:
~ThreadCtx()
{
if(ctx)
- ReleaseThreadCtx(ctx);
- ctx = nullptr;
+ {
+ const bool result{ctx->releaseIfNoDelete()};
+ ERR("Context %p current for thread being destroyed%s!\n",
+ decltype(std::declval<void*>()){ctx}, result ? "" : ", leak detected");
+ }
}
ALCcontext *get() const noexcept { return ctx; }