aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-15 23:15:42 -0800
committerChris Robinson <[email protected]>2022-02-15 23:15:42 -0800
commitaa19223c65d8693dbaa8d8c9fa0c129d77eed4de (patch)
tree41b015eeaedfce5201e8c76931bf4492e3870560 /al/source.cpp
parentfba14feab7783d9c246dd674d0cf0e26010c69d1 (diff)
Use std::exchange instead of two swaps
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 7c6e43f9..59ce5549 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -1477,8 +1477,7 @@ void SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop,
/* Source is now Static */
Source->SourceType = AL_STATIC;
- Source->mQueue.swap(oldlist);
- Source->mQueue.swap(newlist);
+ oldlist = std::exchange(Source->mQueue, std::move(newlist));
}
else
{