From aa19223c65d8693dbaa8d8c9fa0c129d77eed4de Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 15 Feb 2022 23:15:42 -0800 Subject: Use std::exchange instead of two swaps --- al/source.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'al/source.cpp') 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 { -- cgit v1.2.3